Home>Article>Database> How to write delete statement

How to write delete statement

藏色散人
藏色散人 Original
2020-02-15 09:45:49 8030browse

How to write delete statement

How to write the delete statement?

DELETE statement

The DELETE statement is used to delete rows from a table.

(Free learning video tutorial recommendation:mysql video tutorial)

Syntax

DELETE FROM table name WHERE column name = Value

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 structure, attributes and indexes of the table are complete:

DELETE FROM table_name

or:

DELETE * FROM table_name

The above is the detailed content of How to write delete statement. 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