ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 游标问题

游标问题

原创 Linux操作系统 作者:xccfeng 时间:2013-03-18 20:48:11 0 删除 编辑
begin
for cur in (SELECT t.table_name, t.column_name
 FROM USER_TAB_COLUMNS t
 where lower(column_name) in ('prod_id',
                             'feature_id',
                              'member_prod_id',
                              'offer_id',
                              'group_id',
                              'element_id',
                              'sno',
                             'schn_id',
                             'shop_id',
                            'o_offer_id',
                              'rule_id',
                            'rela_seq',
                             'o_prod_id',
                             'price_plan_seq',
                              'mapping_prod_id',
                             'price_plan_id',
                             'catalog_item_id',
                             'sn_id',
                             'brand_id',
                            'seq',
                             'agreement_id',
                            'agreement_spec_id',
                          
                              'duration_id',
                              'entity_attr_seq',
                             'entity_id',
                             'attr_id',
                             'p_entity_attr_id',
                              'p_attr_id',
                              'ref_entity_id',
                             'entity_attr_v_seq',
                             'price_id',
                              'fineitem_id',
                              'penalty_seq',
                             'policy_id')
  and data_length < 20 and t.TABLE_NAME<>'OM_TPL_PRI_FORMULA'
)
loop
execute immediate 'alter table '||cur.table_name||' modify '||cur.column_name||' VARCHAR2(20)';
end loop;
end;
 
找出用户表中表字段含有上述'feature_id'等的用户表,并修改他们为VARCHAR2(20)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28588485/viewspace-756474/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: weblogic静默安装
下一篇: websphere静默安装
请登录后发表评论 登录
全部评论

注册时间:2013-02-25

  • 博文量
    56
  • 访问量
    254456