Row numbers for a query in informix

后端 未结 6 2066
無奈伤痛
無奈伤痛 2020-12-19 11:15

I am using informix database, I want a query which you could also generate a row number along with the query

Like

select row_number(),firstName,lastN         


        
6条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-19 11:34

    I think the easiest way would be to use the following code and adjust its return accordingly. SELECT rowid, * FROM table

    It works for me but please note that it will return the row number in the database, not the row number in the query.

    P.S. it's an accepted answer from Experts Exchange.

提交回复
热议问题