【PostgreSQL】データを取得する(SELECT)

PostgreSQLでデータを取得する手順です。

 

■データを取得する(全部)

test=> select * from mytable; 
 id | name 
—-+—— 
  1 | データ01 
  2 | データ02 
(2 rows) 
 
 
test=> 

 

 

 

■データを取得する(指定)

test=> select id, name from mytable; 
 id | name 
—-+—— 
  1 | データ01 
  2 | データ02 
(2 rows) 
 
 
test=>