number(4,2) 4个数字度,右边2为是小数
不知道你要的是不是这个

解决方案 »

  1.   

    alter table tab1 modify column ( colname number(15,2) )
      

  2.   

    to 2楼      不好意思。。偶没表达清楚,应该是number(14,4) 变成number(14,2)
    to 3楼      偶的表里已经有数据了。。使用alter table 不行d说。
      

  3.   

    有数据后不能更改1.增加一个字段来保存数据
      alter table table_name add (col1 number(14,2))
      update table_name set col1 = round(col,2)
    2.alter table table_name drop column col
    3.alter table table_name add (col number(14,2))
    4 update table_name set col = col1
    5.alter table table_name drop column col1
      

  4.   

    偶就是不想动表里的数据才想找找其他办法啊我觉的oracle中是不是有什么系统存储过程可以实现这个功能啊
      

  5.   

    zhaokeke2004(/ *** 爱拼才会赢 ***/) 的办法可以一试。
    明天来结帐
      

  6.   

    zhaokeke2004(/ *** 爱拼才会赢 ***/) 的办法是可以的,但是也移动了表中的数据,而且还会比较慢,建议你重建一张表,将数据导入会快一些:create table tb_name as select col1,col2,...,trun(col_number,2),..coln from old_table_name nologging;
    drop table old_table_name;这样的操作会快一些,但损失了原来表上的索引,约束以及触发器等信息。