DELETE

更新时间: 2026-03-28 04:12:19

Use DELETE to remove rows from a table. Always include a WHERE clause to target specific rows.

Syntax

DELETE FROM table_name WHERE where_clause;

Parameters

ParameterDescription
table_nameThe name of the table from which rows are deleted.
where_clauseA Boolean expression that identifies which rows to delete. Rows where the expression evaluates to true are removed.

Examples

Delete rows that match an exact condition

Delete the row where p1 = 10 and p2 = 20:

DELETE FROM dt WHERE p1 = 10 AND p2 = 20;

Delete rows that match a range condition

Delete all rows where p1 is greater than 10:

DELETE FROM dt WHERE p1 > 10;
上一篇: UPSERT 下一篇: Compute engine
阿里云首页 云原生多模数据库 Lindorm 相关技术圈