【PostgreSQL】テーブル一覧を確認する

公開日時:2020年10月04日 / 最終更新日時:2020年10月04日

PostgreSQL でテーブル一覧を確認する手順です。

 

 

■テーブル一覧を確認(メタコマンド)

test=> \dt 
         List of relations 
 Schema |  Name   | Type  |  Owner 
--------+---------+-------+---------- 
 public | mytable | table | postgres 
(1 row) 

 

 

■テーブル一覧を確認(SQL文)

test=> select schemaname, tablename, tableowner from pg_tables;  
     schemaname     |        tablename        | tableowner  
--------------------+-------------------------+------------  
 public             | mytable                 | test  
(1 rows)  
 
 
testdb=>  

 

 

 

 

Posted by 100%レンタルサーバーを使いこなすサイト管理人

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

AlphaOmega Captcha Medica  –  What Do You See?
     
 

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください

Secured By miniOrange