首先写个测试数据,然后我们来求一下colone除以coltwo的商
declare @table table (id int,colone numeric(4,2),coltwo numeric(2,1))
insert into @table
select 1,1.2,0.4 union all
select 2,1.4,0.6 union all
select 3,1.8,0.8 union all
select 4,9.1,1.2 union all
首先写个测试数据,然后我们来求一下colone除以coltwo的商
declare @table table (id int,colone numeric(4,2),coltwo numeric(2,1))
insert into @table
select 1,1.2,0.4 union all
select 2,1.4,0.6 union all
select 3,1.8,0.8 union all
select 4,9.1,1.2 union all