상세 컨텐츠

본문 제목

Oracle Table Comment 명령어

DataBase/Oracle

by 탑~! 2015. 9. 18. 09:23

본문

Oracle Table Comment 명령어

테이블에 주석문 추가

comment ON TABLE 테이블명 IS '테이블설명'


컬럼에 주석문 추가

comment ON COLUMN 테이블명.필드명 IS '컬럼설명'


테이블에 주석문 삭제

comment ON TABLE 테이블명 IS ''


주석문 삭제

comment ON COLUMN 테이블명.필드명 IS ''




/* 테이블 생성 */

CREATE TABLE TEST.DI_ZIPIFO (

SEQ NUMBER(22) NOT NULL,

ZIP_CD CHAR(6) NOT NULL,

SIDO_NM VARCHAR2(10),

GUNGU_NM VARCHAR2(20),

UPMYUN_NM VARCHAR2(50),

RI VARCHAR2(50),

DOSEO VARCHAR2(10),

BUNZI VARCHAR2(20),

CTNT VARCHAR2(50),

PRIMARY KEY ( SEQ, ZIP_CD )

)

TABLESPACE SAMPLE_STONE

PCTFREE 10

PCTUSED 40

INITRANS 1

MAXTRANS 255

STORAGE (INITIAL 65536

NEXT

MINEXTENTS 1

MAXEXTENTS 2147483645

PCTINCREASE

FREELISTS 1

FREELIST GROUPS 1);


COMMENT ON TABLE TEST.DI_ZIPIFO IS '우편번호정보';

COMMENT ON COLUMN TEST.DI_ZIPIFO.SEQ IS '순번';

COMMENT ON COLUMN TEST.DI_ZIPIFO.ZIP_CD IS '우편번호';

COMMENT ON COLUMN TEST.DI_ZIPIFO.SIDO_NM IS '시도';

COMMENT ON COLUMN TEST.DI_ZIPIFO.GUNGU_NM IS '시군구';

COMMENT ON COLUMN TEST.DI_ZIPIFO.UPMYUN_NM IS '읍면동';

COMMENT ON COLUMN TEST.DI_ZIPIFO.RI IS '리';

COMMENT ON COLUMN TEST.DI_ZIPIFO.DOSEO IS '도서';

COMMENT ON COLUMN TEST.DI_ZIPIFO.BUNZI IS '번지';

COMMENT ON COLUMN TEST.DI_ZIPIFO.CTNT IS '내용';


관련글 더보기