Ffor testing purposes I need to write a SQL query which contains the actual record number as a column in the result set. If my SELECT gets back to me with 10 records as the result, I need to have one column which contains the values 1-10.
Is there a way to achieve this without a stored procedure cursoring through my data?
EDIT: I need this on postgresql.