Home  >  Article  >  Database  >  How to delete table data in oracle

How to delete table data in oracle

angryTom
angryTomOriginal
2020-02-29 11:58:2521138browse

How to delete table data in oracle

How to delete table data in oracle

Two methods to delete table contents

1. Truncate table table name;

2. Delete from table name where condition;

The difference between the two methods:

truncate, which means truncate the table and can not occupy resources The advantage of deleting all tables is that it is fast, but the disadvantage is that the deletion cannot be restored and it cannot be deleted conditionally.

delete means deletion. This operation occupies redolog. The advantage is that it can be quickly restored and selected for deletion. The disadvantage is that deletion is slow. It is not recommended for large-scale deletion.

PHP Chinese website has a large number of free SQL tutorials, everyone is welcome to learn!

The above is the detailed content of How to delete table data in oracle. For more information, please follow other related articles on the PHP Chinese website!

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