PostgreSQL 테이블 생성

DB/Postgresql|2021. 8. 4. 23:56

PostgreSQL 테이블 생성

 

먼저 유저로 로그인

postgres=# \c aptdb aptdb

 

테이블 생성

aptdb=# CREATE TABLE test (
id integer,
name character varying(255));
CREATE TABLE

 

생성된 테이블 확인

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

댓글()