Get the App
SLTechnology News&Howtos  ›  Database  › 

PLSQL deletes all tables under a user

Shulou Source: shulou.com Published: 2022-06-01 12:54:08 10月09日 Update

1. PLSQL logs in to user An and opens a SQL Window window.

2. Build the command to delete all tables

Select 'drop table' | | table_name | | 'purge' from user_tables

Or

Select 'drop table' | | table_name | |'; 'from user_tables

Note: adding 'purge'' means permanent deletion is unrecoverable

3. Open a Command Window window and execute all the SQL copies built above.

Note: if there is a primary key association, continue to perform steps 2 and 3 until there is no result in the query 2.

Tags: User command copy step result permanent association query login Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker Redmi MariaDB Huawei