-
Notifications
You must be signed in to change notification settings - Fork 647
ROWNUM
Andrey Gershun edited this page May 13, 2015
·
2 revisions
#ROWNUM() / ROW_NUMBER()
You can receive number of result record in the recordset like in this example:
alasql('CREATE TABLE one (a INT PRIMARY KEY)');
for(var i=1;i<1000;i++) {
alasql('INSERT INTO one VALUES (?)',[i]);
};
var res = alasql('SELECT * \
FROM (SELECT a, ROWNUM() AS r FROM one)\
WHERE r BETWEEN 55 AND 60');
You can try this example in jsFiddle
© 2014-2023, Andrey Gershun & Mathias Rangel Wulff
Please let us know if something could be described better by submitting an issue