2008-09-26 特定の単位内での行番を取得する Oracle select ROW_NUMBER() over (partition by カラムA order by カラムA, カラムB) , カラムA , カラムB from X これで、カラムAが同一なデータ内での行番を取得できる。