Skip to content

Insert Values

Mathias Rangel Wulff edited this page Jun 12, 2015 · 3 revisions

Keyword 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 and INSERT SELECT

Clone this wiki locally