2012-05-21 取得したSQLに行番号を振る方法 SQL row_numberを使う over()は番号を振る並び順の設定を行う select row_number() over(order by FieldA, FieldB, FieldC),* from TableA