Home > Database > Mysql Tutorial > How to delete a row of data in mysql table?

How to delete a row of data in mysql table?

烟雨青岚
Release: 2020-07-03 14:54:30
Original
7069 people have browsed it

Use the DELETE statement in mysql to delete a row of data in the table. The statement is "DELETE FROM table name WHERE column name = value". The statement to delete all rows is "DELETE FROM table_name".

How to delete a row of data in mysql table?

Use the DELETE statement in mysql to delete a row of data in the table.

The statement is "DELETE FROM table Name WHERE column name = value "

DELETE FROM table name WHERE field 1 = '' and field 2 = '' and ... field 1, ... is to be able to uniquely determine a certain For the field combination of a row of data, just fill in the specific value of the field you want

to delete in "".

If there is a primary key, just use the primary key to determine a certain row.

DELETE FROM table name WHERE primary key = ‘specific value’.

How to delete a row of data in mysql table?

delete from ms_cf01 where brxm='张三' and id='7598';
Copy after login

Among them: ms_cf01 is the table to which the data you want to delete belongs.

brxm, id is the condition under which you want to delete the data.

The effect of the above statement is to delete the row data in table ms_cf01 that matches brxm equals Zhang San and id equals 7598.

This completes the data operation of deleting a row.

Recommended tutorial: "MySQL Tutorial"

The above is the detailed content of How to delete a row of data in mysql table?. 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