Skip to content
Mathias Rangel Wulff edited this page May 31, 2016 · 10 revisions

Keyword UPDATE

Syntax:

    UPDATE table SET prop1 = value1, ... WHERE condition

For example:

alasql("UPDATE events SET synchronized = ? WHERE name = ?", [true, event.name]);

alasql('UPDATE cities SET population = population * 1.5 WHERE name LIKE "A%"');

alasql('UPDATE city SET population = LEN(name) * 1000000 WHERE name LIKE "M%"');

An UPDATE statement will return the amount of rows updated by the statment.

See also: DELETE, INSERT

Clone this wiki locally