PostgreSQL Drop column

DB/Postgresql|2021. 8. 15. 17:54

테이블에서 칼럼을 삭제하는 방법 입니다.

ALTER TABLE table_name 
DROP COLUMN column_name;

 

칼럼이 존재하는지 확인한후 삭제하는 방법 입니다.

ALTER TABLE table_name 
DROP COLUMN IF EXISTS column_name;

'DB > Postgresql' 카테고리의 다른 글

Postgresql db 버전확인  (0) 2021.08.16
Postgresql rownum 사용하기  (0) 2021.08.16
[mac] postgresql 외부접속 가능하게 변경  (0) 2021.08.15
[mac] postgresql 서비스 시작/종료  (0) 2021.08.15
windows 에 PostgreSQL 설치  (0) 2021.08.05

댓글()