Try Alasql in console!
Alasql - 'à la SQL' - is a lightweight client-side in-memory SQL database designed to work in browser and Node.js.
- Alasql was written with pure JavaScript and does not use browser WebSQL database.
- Alasql is fully functional compact sql server with JOINs, GROUPs, UNIONs, ANY, ALL, IN, subqueries and very limited transactions support.
- Alasql supports ROLLUP(), CUBE() and GROUPING SETS() functions
- Alasql works with all modern versions of browsers (Chrome, Firefox, IE, Safari), Node.js, and mobile iOS and Android.
- Alasql is fast, because it uses some optimization methods.
It is easy to use
<script src="alasql.js"></script>
<script>
alasql("CREATE TABLE test (language INT, hello STRING)");
alasql("INSERT INTO test VALUES (1,'Hello!')");
alasql("INSERT INTO test VALUES (2,'Aloha!')");
alasql("INSERT INTO test VALUES (3,'Bonjour!')");
console.log( alasql("SELECT * FROM test WHERE language > 1") );
</script>
Check Alasql vs other JavaScript databases:
View Alasql documentation on GitHub!