-
Notifications
You must be signed in to change notification settings - Fork 664
Api
agershun edited this page Dec 28, 2014
·
8 revisions
alasql(‘CREATE DATABASE test01’);
alasql(‘USE test01’);
alasql(‘CREATE TABLE one (a INT)’);
alasql(‘INSERT INTO one VALUES (10)’):
var res = alasql(‘SELECT * FROM one’);
var data = [{a:1}, {a:2}, {a:3}];
alasql(‘SELECT * FROM ? WHERE a >= ?’, [data, 2]);
// or
var db = new alasql.Database();
db.exec(“select * from one”, function(data) {
console.log(data.length);
});
See [alasql object](Alasql Object)
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo