ALTER TABLE test ADD COLUMN work VARCHAR(25);
ALTER TABLE TEST DROP COLUMN depno CASCADE;
ALTER TABLE TEST DROP COLUMN depno CASCADE;
--保证TEXT 列无空值,需先update为非空
ALTER TABLE TEST ALTER COLUMN TEXT SET NOT NULL;
ALTER TABLE TEST ALTER COLUMN TEXT SET NOT NULL;
--修改后的字段类型需包容原来的类型
ALTER TABLE TEST ALTER COLUMN text SET DATA TYPE VARCHAR(150);
ALTER TABLE "TEST" ADD COLUMN no INTEGER;
ALTER TABLE FM_APPLICATION ALTER COLUMN CODE_NO SET NOT NULL;
ALTER TABLE TEST ALTER COLUMN text SET DATA TYPE VARCHAR(150);
ALTER TABLE "TEST" ADD COLUMN no INTEGER;
ALTER TABLE FM_APPLICATION ALTER COLUMN CODE_NO SET NOT NULL;
ALTER TABLE "TEST" ADD COLUMN no INTEGER with default 1;
ALTER TABLE "TEST" ADD COLUMN ENTRYROW_ID DECIMAL(15,5);
--INTEGER =>DECIMAL
ALTER TABLE "TEST" ALTER COLUMN "num" SET DATA TYPE DECIMAL(18,2);
ALTER TABLE "TEST" ALTER COLUMN "num" SET DATA TYPE DECIMAL(18,2);
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/241379/viewspace-753141/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/241379/viewspace-753141/