0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【PL/SQL】テーブルの削除(DROP TABLE)

Last updated at Posted at 2019-03-13

テーブルの削除(DROP TABLE)

やりたいこと

テーブルのデータではなく、テーブル自体を削除する。

サンプルコード

DROPでは完全削除はされず、ごみ箱に移動されます。

DROP TABLE {テーブル名} CASCADE CONSTRAINTS;

削除したテーブルを復活させるには以下のように行います。

FLASHBACK TABLE {テーブル名} TO BEFORE DROP;

ごみ箱を完全消去するには以下のように行います。

PURGE RECYCLEBIN;

ごみ箱を経由せずに完全にテーブルを削除するには以下のように行います。

DROP TABLE {テーブル名} PURGE;

削除する際にはスキーマをちゃんと確認しましょう!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?