Skip to content

Latest commit

 

History

History
35 lines (23 loc) · 806 Bytes

File metadata and controls

35 lines (23 loc) · 806 Bytes

< Index

Delete

Deleting rows from tables is straight forward:

db(delete_from(tab).where(tab.alpha == 35));

where

The where clause specifies which rows should be affected.

where can be called with a dynamic argument. In case the dynamic condition is false, no WHERE will be included in the serialized statement.

Note

Each of the connectors is offering a specialized version of delete.

Truncate

If you want to delete all rows from a table, the truncate function might be the faster option.

db(truncate(tab));

Note

sqlite3 does not support TRUNCATE. The sqlite3/SQLCipher connector therefore serializes this as unconditional DELETE FROM.

< Index