Skip to content
agershun edited this page Dec 28, 2014 · 4 revisions

TOP

Select top 10 records of data table:

    alasql('SELECT TOP 10 * FROM Cities ORDER BY Name');

Select top 10 records of array:

    var data = [];
    for(var i=0;i<100;i++) data.push({num:i});
    var res = alasql('SELECT TOP 10 * FROM ?',[data]);
Clone this wiki locally