ora-01440:要减小精度或标度,则要修改的列必须为空
--修改cell表所有面积相关字段的小数位数为2
UPDATE gfm_rp_cell t SET t.DEC_LEN=2 WHERE t.FIELD_CN_NAME LIKE '%面积%';
--创建临时表来存储原数据,并删除表数据
CREATE TABLE gfm_bs_asset_facility_bak as SELECT * FROM gfm_bs_asset_facility;
DELETE FROM gfm_bs_asset_facility;
--修改表字段
ALTER TABLE gfm_bs_asset_facility MODIFY N1 NUMBER(18,2);
ALTER TABLE gfm_bs_asset_facility MODIFY N2 NUMBER(18,2);
ALTER TABLE gfm_bs_asset_facility MODIFY N3 NUMBER(18,2);
ALTER TABLE gfm_bs_asset_facility MODIFY N4 NUMBER(18,2);
--还原表结构
INSERT INTO gfm_bs_asset_facility SELECT * FROM gfm_bs_asset_facility_bak;
--删除临时表
DROP TABLE gfm_bs_asset_facility_bak;