-
Notifications
You must be signed in to change notification settings - Fork 664
Comparing
Andrey Gershun edited this page May 25, 2015
·
1 revision
In AlaSQL you can use standard comparing operators:
- = != (or <>)
-
= < <=
- BETWEEN / [NOT BETWEEN](Not Between)
See the example:
// Fill table with data
var person = [
{ name: 'bill' , sex:'M', income:50000 },
{ name: 'sara' , sex:'F', income:100000 },
{ name: 'larry' , sex:'M', income:90000 },
{ name: 'olga' , sex:'F', income:85000 },
];
// Do the query
var res1 = alasql("SELECT * FROM ? person WHERE income = 50000", [person]);
var res2 = alasql("SELECT * FROM ? person WHERE sex='F'", [person]);
You can try this example in jsFiddle
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo