Home  >  Article  >  Database  >  How to delete qualified data in navicat

How to delete qualified data in navicat

angryTom
angryTomOriginal
2019-08-05 13:18:096590browse

How to delete qualified data in navicat

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

##DELETE FROM table_name WHERE some_column=some_value;

Please note the WHERE in the SQL DELETE statement clause! The WHERE clause specifies which record or records need to be deleted. If you omit the WHERE clause, all records will be deleted!

Example

In this tutorial, we will use a sample database.

The following is the data selected from the "person" table:

LastNameFirstNameAddressCityGatesBillXuanwumen 10BeijingWilsonFredZhongshan 23Nanjing
##Delete a row


"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!

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