当前位置:首页 > 开发 > 数据库 > 正文

oracle修改字段类型

发表于: 2012-04-06   作者:czpae86   来源:转载   浏览:
摘要: 例子:l_amount_temp是临时字段, L_AMOUNT是要修改的字段.     alter table LAW_LITIGATION_CASE add l_amount_temp int;      alter table LAW_LITIGATION_CASE modify L_AMOUNT NULL;   update LAW_LITIGATION_C

例子:l_amount_temp是临时字段, L_AMOUNT是要修改的字段.

 

 

alter table LAW_LITIGATION_CASE add  l_amount_temp int;
  
  alter table LAW_LITIGATION_CASE modify L_AMOUNT NULL;
  update LAW_LITIGATION_CASE set  l_amount_temp=L_AMOUNT,L_AMOUNT=NULL;
  commit;
  alter table LAW_LITIGATION_CASE modify L_AMOUNT float(24);
  update LAW_LITIGATION_CASE set L_AMOUNT= l_amount_temp, l_amount_temp=NULL;
  commit;
  alter table LAW_LITIGATION_CASE drop column  l_amount_temp;
  alter table LAW_LITIGATION_CASE modify L_AMOUNT NOT NULL;

oracle修改字段类型

  • 0

    开心

    开心

  • 0

    板砖

    板砖

  • 0

    感动

    感动

  • 0

    有用

    有用

  • 0

    疑问

    疑问

  • 0

    难过

    难过

  • 0

    无聊

    无聊

  • 0

    震惊

    震惊

版权所有 IT知识库 CopyRight © 2009-2015 IT知识库 IT610.com , All Rights Reserved. 京ICP备09083238号