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

How to delete a row of data in mysql table?

烟雨青岚
烟雨青岚 Original
2020-07-03 14:54:30 6955browse

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';

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!

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