Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Several methods of deleting Table by Oracle

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Drop table books; 's instructions will put the table in the Recycle Bin

You can recover with flashback table "BIN$1Oiy3qm/QJubov1BwBUOgw==$0" to before drop;.

Delete table: drop table books purge; bypasses the Recycle Bin. If you delete it completely, you are advised to purge recyclebin first.

Clears the current user's Recycle Bin without affecting other users' Recycle Bin or purge table table names

Clear the specified table in the Recycle Bin

Body: delete the name delete of the table (record and structure)-truncate-drop DELETE (delete the statement recorded in the data table)

DELETE FROM table name WHERE condition

Note: deleting a record does not free up the occupied block tablespace in ORACLE. It marks only those deleted blocks as unused.

If you do want to delete all records in a large table, you can use the TRUNCATE command

It frees the occupied block tablespace TRUNCATE TABLE table name; this operation is not retractable.

At the same point, truncate and delete without a where clause, and drop will delete the data in the table.

Note: delete here refers to a delete statement without a where clause

Differences: 1. Truncate and delete only delete data, not table structure (definition)

The drop statement removes constraints (constrain), triggers (trigger), and indexes (index) that depend on the structure of the table.

Stored procedures / functions that depend on the table are retained but become invalid.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report