数据库(MySQL)中使用in实现批量删除

2025-3-26 / 0 评论 / 2 阅读

sql删除一个数据语法:
DELETE "栏位名"
FROM "表格名"
WHERE "栏位名" = '值';
示例:

DELETE * from formName where "name" = 'jack';

sql批量删除数据语法:
DELETE "栏位名"
FROM "表格名"
WHERE "栏位名" IN ('值一', '值二', ...);
示例:

DELETE * from formName where "name" in ('jack','rose','tom');