-- 解除锁表
CALL SYSPROC.ADMIN_CMD('REORG TABLE BS_DOC_CONTRACT_INFO');
-- 添加字段
alter table BS_CREDIT_AGREEMENT_MASTER add MARGIN_PROPORTION DECIMAL(18,6);
comment on column BS_CREDIT_AGREEMENT_MASTER.MARGIN_PROPORTION is '保证金比例';
--更改字段类型
alter table [表名] alter column [字段名] set data type [column_type]
-- decimal(18,4)
--设置字段默认时间为当前时间
alter table [表名] alter column [字段名] set default current date;
-- 去掉字段
alter table [表名] drop column [字段名]
-- 添加表注释
comment on table [表名] is '注释内容';
-- 删除外键
alter table AA_ROLEMENU drop constraint FK_REFERENCE_54
-- 备份表数据
create table BD_INFO_CLIENT_BAK as (select c.* from BD_INFO_CLIENT c) definition only;
INSERT INTO BD_INFO_CLIENT_BAK SELECT * FROM BD_INFO_CLIENT;
-- 设置默认值
alter table BD_INFO_CLIENT_BANK alter COLUMN PAYTYPW set default '01';