Home > Database > Mysql Tutorial > body text

How to delete the first few rows in mysql

藏色散人
Release: 2020-10-30 16:52:24
Original
3556 people have browsed it

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;
Copy after login

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!

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!