1
1

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 3 years have passed since last update.

PostgreSQLのコマンド その2

Last updated at Posted at 2020-01-30

PostgreSQLのコマンド その2

テーブル

テーブルの一覧表示(view、sequenceも含む)

# \d

テーブルの一覧表示

# \dt

テーブルのスキーマ詳細表示

# \d <tablename>

テーブルのアクセス権限表示

# \z <tablename>

viewの一覧表示

# \dv

viewの定義表示

# SELECT definition FROM pg_views WHERE viewname = '<viewname>';

テーブル名変更

# ALTER TABLE current_tablename RENAME TO <new_tablename>;

テーブルの削除

# DROP TABLE <tablename>;
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?