mysql如何实现批量删除

  • 来源:网络
  • 更新日期:2020-09-30

摘要:mysql实现批量删除的方法:使用sql实现批量删除数据,代码为【DELETE "栏位名" FROM "表格名" WHERE "栏位名" IN ('值一', '值二', ...);】。mysql实现批量删

mysql实现批量删除的方法:使用sql实现批量删除数据,代码为【DELETE "栏位名" FROM "表格名" WHERE "栏位名" IN ('值一', '值二', ...);】。

mysql实现批量删除的方法:

sql删除一个数据语法:

DELETE "栏位名" 
FROM "表格名" 
WHERE "栏位名" = '值';

示例:

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

sql批量删除数据语法:

DELETE "栏位名" 
FROM "表格名" 
WHERE "栏位名" IN ('值一', '值二', ...);

示例:

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

更多相关免费学习推荐:mysql教程(视 频)