LoginSignup
1
2

More than 5 years have passed since last update.

PostgreSQL(psql)の使い方(超基本)

Last updated at Posted at 2017-05-24

シェルで

$ psql -l  
$ psql  

上記はそれぞれ
* DB一覧表示
* PSQL起動

psqlモードで

\l
\c qiita_db
\d
select * from customer;

上記はそれぞれ
* DB一覧表示
* DB切り替え
* テーブル一覧表示
* テーブル内容表示

ここで
* qiita_dbはデータベース名
* customerはテーブル名

(参考)確認環境/メモ

  • PostgreSQL 9.6
  • CentOS 6.5
1
2
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
2