- 
                Notifications
    
You must be signed in to change notification settings  - Fork 690
 
Multiple Statements
        Mathias Rangel Wulff edited this page Jun 12, 2015 
        ·
        2 revisions
      
    ##Single SQL statement
Returns a single value of query result:
- Query result
 
    alasql('SELECT * FROM one');
    => [{a:1},{a:2}]- Number of rows processed
 
    alasql('DELETE FROM one WHERE rownum < 363');
    => 362- Number of database object processed (e.g. tables dropped):
 
    alasql('DROP DATABASE IF EXISTS geo');
    => 1 (if dropped) or 0 (if not exists)Return array of results in array, each element is a result for each statements processed:
    alasql(“CREATE DATABASE test; USE test1”);
    => [1,0, [{a:1},{a:2}]]In async call all statements run in sequence, one after previous statements finished.
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo