Navicat wants to delete data that meets certain conditions. Just use the delete statement, delete from table name where condition 1 and/or condition 2. The following is a detailed introduction to how to use the delete statement.
Recommended tutorial: MySQL introductory video
SQL delete statement
The DELETE statement is used to delete rows from a table.
Syntax
Example
In this tutorial, we will use a sample database. The following is the data selected from the "person" table:FirstName | Address | City | |
---|---|---|---|
Bill | Xuanwumen 10 | Beijing | |
Fred | Zhongshan 23 | Nanjing |
"Fred Wilson" will be deleted:
DELETE FROM Person WHERE LastName = 'Wilson'Delete all rows
You can delete all rows without deleting the table. This means that the table's structure, attributes, and indexes are complete:
DELETE FROM table_name
The above is the detailed content of How to delete qualified data in navicat. For more information, please follow other related articles on the PHP Chinese website!