Home  >  Article  >  Database  >  How to delete the first few rows in mysql

How to delete the first few rows in mysql

藏色散人
藏色散人Original
2020-10-28 10:18:523602browse

In mysql, you can delete the first few rows of data through the "delete from table_name where 1=1 order by order_name limit 100;" method.

How to delete the first few rows in mysql

Recommendation: "mysql video tutorial"

mysql deletes the first 100 data of a table

To delete the first 100 pieces of data, you must first sort and then delete the first 100 pieces of data.

sql statement format is:

delete from table_name where 1=1 order by order_name limit 100;

where table_name is the name of the table where you want to delete data, order_name is the field name by which field you want to sort, if the system automatically The default sorting, order by order_name does not need to be written.

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