--1、修改管道表字段数据类型 ALTER TABLE Transfer_Piping ALTER COLUMN TotalFactor decimal(10, 2); ALTER TABLE Transfer_Piping ALTER COLUMN CompleteFactor decimal(10, 2); update Transfer_Piping set CompleteProportion='0'where CompleteProportion='' or CompleteProportion is null; go ALTER TABLE Transfer_Piping ALTER COLUMN CompleteProportion decimal(10, 2); go --3、移交统计表补充电伴热和保温冷 IF NOT EXISTS(select * from sys.columns where name='Insulation' and [object_id]=object_id(N'Transfer_SystemControl')) BEGIN --电伴热 ALTER TABLE Transfer_SystemControl ADD ElectricHeatTracing nvarchar(50) NULL; --保温/冷 ALTER TABLE Transfer_SystemControl ADD Insulation nvarchar(50) NULL; END go