retrieve row number

Поиск
Список
Период
Сортировка
Искать

retrieve row number

От:
"Pascal Tufenkji" <ptufenkji@usj.edu.lb>
Дата:

Hi,

 

Can I retrieve the row number in a select statement?

For example : if I have the following table “foo”

 

col1 | col2

-----+-----

 a   | x

 b   | y

 c   | z

 

 

select ?? as row_number, col1, col2 from foo;

 

I should obtain the following result :

 

row_number | col1 | col2

-----------+------+-----

         1 | a   | x

         2 | b   | y

         3 | c   | z

 

 

Thank you

Pascal

Re: retrieve row number

От:
"A. Kretschmer" <andreas.kretschmer@schollglas.com>
Дата:
FAQ