Home > Database > Mysql Tutorial > body text

How to write delete statement

藏色散人
Release: 2020-02-15 09:45:49
Original
8062 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!