Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
Mathias Wulff edited this pageDec 15, 2025 ·11 revisions

KeywordUPDATE

Syntax:

UPDATE tableSET 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%"');

OUTPUT Clause

You can use theOUTPUT clause to return the updated data (both old and new values).

// Return the new valuesalasql('UPDATE cities SET population = population * 1.5 WHERE name = "Paris" OUTPUT INSERTED.*');// Return the old valuesalasql('UPDATE cities SET population = population * 1.5 WHERE name = "Paris" OUTPUT DELETED.*');// Return both old and new valuesalasql('UPDATE cities SET population = population * 1.5 WHERE name = "Paris" OUTPUT DELETED.population AS old_pop, INSERTED.population AS new_pop');

AnUPDATE statement will return the amount of rows updated by the statment.

See also:DELETE,INSERT

© 2014-2026,Andrey Gershun &Mathias Rangel Wulff

Please help improve the documentation by opening a PR on thewiki repo

Clone this wiki locally


[8]ページ先頭

©2009-2025 Movatter.jp