how to know a row index in a query?

48 views
Skip to first unread message

Hung Tran

unread,
Jan 28, 2016, 10:45:43 AM1/28/16
to orient-...@googlegroups.com
Hi,

I am looking for a row function or a row variable which could return the current row index of a row in my query. That's ROWNUM in Oracle, ROW_NUMBER() in MySQL and MSSQL. Is there any equivalent here?

My Best,
Hung Tran

alessand...@gmail.com

unread,
Jan 28, 2016, 10:58:02 AM1/28/16
to OrientDB
Hi,
try this query

select $counter, @rid from v
let $counter = eval("$counter + 1")

Regards,
Alessandro
Reply all
Reply to author
Forward
0 new messages