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'].
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 主键 = ‘具体值'。
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 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!