SQL · Writing data

delete

Removes matching rows. Prefer soft deletes when audit history or recovery matters.

Syntax
delete from table where …;

Example

Open in the lab

More in this group

insert insert from select insert returning merge truncate update update from upsert

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course