Home > Database > Mysql Tutorial > body text

How to delete the first row of data in mysql

coldplay.xixi
Release: 2020-10-23 09:53:58
Original
12079 people have browsed it

Mysql method of deleting the first row of data: first determine the fields or field combinations of that row of data; then enter the relevant delete statement, the code is [DELETE FROM table name WHERE primary key = 'specific value'].

How to delete the first row of data in mysql

Mysql method of deleting the first row of data:

First of all, you must make sure that you can uniquely identify your row of data What are the fields or field combinations?

DELETE FROM table name WHERE field 1 = '' and field 2 = '' and...field 1,... can be uniquely determined For the field combination of a certain 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 表名 WHERE 主键 = ‘具体值'。
Copy after login

How to delete the first row of data in mysql

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 for the data you want to delete.

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.

More related free learning recommendations: mysql tutorial(Video)

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