Oracle Delete Data

Source: Internet
Author: User

The syntax for Oracle to delete data in a table is:

Syntax structure:

DELETE from table name WHERE condition


Code Demo:

Sql> DELETE from Infos WHERE stuid= ' s100103 '; 1 ROW DELETED sql> COMMIT;


TRUNCATE

In a database operation, the truncate command (a DDL command) can delete all the data in a table at once, with the syntax:

Syntax structure:

TRUNCATE Table Name


Truncate and delete all can delete the data in the table, their difference is:
1, truncate is the DDL command, the deleted data cannot be recovered; The delete command is a DML command, and the deleted data can be recovered through the log file.
2, if the data record in a table is many, truncate relative delete speed.

Because the truncate command is dangerous, the truncate command is used sparingly in the actual development.

Oracle Delete Data

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.