SQL method to delete multiple pieces of data: execute the [delete from table name where id in (id_1,id_2,id_3)] command. sql is a database query and programming language that is used to access data and query, update and manage relational database systems.
Structured Query Language (Structured Query Language), referred to as SQL (pronounced: /ˈes kjuː ˈel/ "S-Q-L"), is a special-purpose programming language , is a database query and programming language used to access data and query, update and manage relational database systems; it is also the extension of database script files.
How to delete multiple records with one sql statement?
For example: There are rows with IDs a, b, c, d, and e in the table. Use a SQL to delete the row with ID number abc:
Answer: delete from table name where id in (a,b,c)
The above is the detailed content of How to delete multiple pieces of data in sql. For more information, please follow other related articles on the PHP Chinese website!