Get row number in select result 14 Jan 2016 select row_number() over (), some_col, some_other_col from my_table where col = 'bar';