Skip to content

Insert Values

Andrey Gershun edited this page May 28, 2015 · 3 revisions

INSERT VALUES

Syntax:

    INSERT INTO tableid VALUES (vaule,...), ...
    INSERT INTO tableid VALUES {key:value, ...}, ...

For example:

    alasql('CREATE TABLE Cities (City STRING, Population NUMBER)');
    alasql('INSERT INTO Cities VALUES ("Moscow", 11500000), ("London",6000000)');
    alasql('INSERT INTO Cities VALUES ?',[{City:'Berlin', Population:4300000}]);
    alasql('INSERT INTO Cities VALUES (?,?)',["Beijing",5000000]);
    alasql('INSERT INTO Cities VALUES {City:"Paris",Population:5000000}');

See also: INSERT

Clone this wiki locally