Home > Database > Mysql Tutorial > body text

How to implement batch deletion in mysql

coldplay.xixi
Release: 2020-09-30 13:24:23
Original
7924 people have browsed it

Mysql method to implement batch deletion: use sql to implement batch deletion of data, the code is [DELETE "field name" FROM "table name" WHERE "field name" IN ('value one', 'value two ', ...);].

How to implement batch deletion in mysql

Mysql method to implement batch deletion:

sql syntax for deleting a data:

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

Example:

DELETE * from formName where "name" = 'jack';
Copy after login

sqlBatchDelete data syntax:

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

Example:

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

More related free learning recommendations: mysql tutorial(view frequency)

The above is the detailed content of How to implement batch deletion in mysql. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template