SQL 处理

--查询数据库字段相加,同时对金额字段进行处理

and td.account.accountID||'#'||td.oppAccountNO||'#'||trim(to_char(td.creditAmount,'99999999999999.99')) in (:value)");

--修改一个字段是否可为空

ALTER TABLE CMCS3_PAYMENT_LIST MODIFY USERID NULL;

--修改一个表的字段的默认值

Alter Table cm_tms_voucher_status modify issend_ default 0;

--oracle 中怎么把一个表中的数据完全复制到另外一个表

如果表存在可以使用

 

insert  into  table2  select  from  table1;
如果表不存在可以使用
create  table  table2  as  select  from  table1;

猜你喜欢

转载自2594082lhj.iteye.com/blog/1749113
今日推荐