Home  >  Article  >  Database  >  How to delete multiple pieces of data in sql

How to delete multiple pieces of data in sql

藏色散人
藏色散人Original
2019-05-13 13:25:1325367browse

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.

How to delete multiple pieces of data in sql

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!

Statement:
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