MySQL SQL Delete Limit use method detailed

Source: Internet
Author: User

Single-table syntax: delete [low_priority] [quick] [ignore] from Tbl_name
[Where Where_definition]
[Order BY ...]
[Limit Row_count]

Delete all rows
You can delete all rows without deleting the table. This means that the structure, properties, and indexes of the table are complete:

Delete from table_name or:

Delete * FROM table_name
For more details please see: http://www.111cn.net/database/110/fe4ad23aea66460c3531f081db0aaa89.htm

The following specifies the difference for deletion such as 0,30

Delete from DB limit 0,30

This is basically my test. However, delete from DB limit 30 can be tested through, do not know is not my version of the problem


It seems like limit after the deletion of the number of records, and did not give the same as the starting record in the Select sample!

And then if I wanted limit 30 to be deleted by default, it would be similar to select * from DB limit 0, 30,

Select from ' Sheet1 ' where 1 limit 0, 1

Delete from ' Sheet1 ' where 1 limit 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.