Detailed description of delete statement in SQL

Source: Internet
Author: User

Table: the name of the deleted data Table.
1: The table must be a fact-existing table. The table must be a table that actually exists in the database. It must be an intermediate table created by a select statement.
2: This method allows you to join data that meets certain association conditions in two tables at the same time.

Top (*) is used to specify the number of data to be deleted.
1: Top (N) indicates to delete the Top N data entries in the table.
2: it cannot be used together with order in delete, so it cannot be connected through top or order by to delete all the first few records sorted by a certain condition.
3: The modified statement cannot be used in sql2000.

Search_condition is used to specify conditions for data deletion.
1: This command is the same as search_condition in select.
2: This command will delete all data queried through the query conditions. (In the case of no top ).

Related Article

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.