--删除主键
ALTER TABLE EXP.OLTP_TRANSFERS DROP PRIMARY KEY;
COMMIT;
--新增主键
ALTER TABLE EXP.OLTP_TRANSFERS ADD CONSTRAINT OLTP_TRANSFERS_PK PRIMARY KEY(COLUMN_NAME);
COMMIT;
--添加索引
CREATE /*UNIQUE唯一*/ INDEX EXP.OLTP_TRANSFERS_IDX_1
ON EXP.OLTP_TRANSFERS ( COLUMN_NAME ASC )
ALLOW REVERSE SCANS
COMPRESS NO INCLUDE NULL KEYS;
COMMIT;
--删除索引
DROP INDEX EXP.OLTP_TRANSFERS_IDX_1;
COMMIT;
--添加字段
ALTER TABLE EXP.OLTP_TRANSFERS ADD COLUMN COLUMN_NAME VARCHAR(10);
COMMIT;
--设置非空,需要重整表
ALTER TABLE EXP.OLTP_TRANSFERS ALTER COLUMN COLUMN_NAME SET NOT NULL;
COMMIT;
--删除字段,需要重整表
ALTER TABLE EXP.OLTP_TRANSFERS DROP COLUMN COLUMN_NAME CASCADE;
COMMIT;
--重整表
REORG TABLE EXP.OLTP_TRANSFERS;
COMMIT;