天天看点

常用SQL语句(ORACLE)_不断更新中

alter table table_name add (col1 type,col2 type); 


ALTER TABLE TABLE_AAA ADD (STOCKMAN NUMBER(18))//添加一列 

COMMENT ON COLUMN TABLE_AAA.STOCKMAN IS '管理人员' //给列添加注释 

ALTER TABLE TABLE_AAA ADD CONSTRAINT FK_TABLE_AAA_R_TABLE_BBB_S FOREIGN KEY (STOCKMAN) REFERENCES TABLE_BBB (ID)//给列添加外键