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 ·9 revisions

KeywordDELETE

Syntax:

DELETEFROM table [WHERE expression]

Samples:

alasql('DELETE FROM cities WHERE population < 100000');alasql('DELETE FROM star WHERE name LIKE "A%"');alasql('DELETE FROM countries');

To delete all records from table:

alasql('DELETE FROM [Table A]');

To delete only selected records from table:

varnumberOfDeletedLines=alasql('DELETE FROM [Table A] WHERE field1 > 10');

OUTPUT Clause

You can use theOUTPUT clause to return the deleted data.

// Return all deleted columnsalasql('DELETE FROM cities WHERE population < 100000 OUTPUT DELETED.*');// Return specific columnsalasql('DELETE FROM cities WHERE population < 100000 OUTPUT DELETED.name, DELETED.population');

ADELETE statement will return the amount of rows deleted by the statment.

See also:INSERT,UPDATE

© 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