deleting data with SQL

Source: Internet
Author: User
Use the delete command to delete data, and use the "truncate" command to delete entire table data but preserve the structure.
4.7.1 Delete Records
In the command edit area, enter the delete from Scott.test where empno>=7500 and empno<=8000;, and then click the Execute button to see the result as shown in Figure 4.47.
"See CD-ROM File": \ 4th Chapter \4.7\471.sql.

Delete The syntax of the record: delete from datasheet where condition.
4.7.2 whole table Data deletion
Enter the TRUNCATE TABLE scott.test in the command edit area, and then click the Execute button to see the results shown in Figure 4.48.
"See CD-ROM File": \ 4th Chapter \4.7\472.sql.

The TRUNCATE TABLE command deletes all records in the datasheet quickly, but preserves the data table structure. This quick deletion is not the same as deleting all data table records from the delete from datasheet, and the delete command data is stored in the system rollback segment, and data can be rolled back to recovery when required, and the data deleted by the TRUNCATE command cannot be recovered.

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: 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.