D
david_lsh
Unregistered / Unconfirmed
GUEST, unregistred user!
1. 建表
CREATE TABLE [dbo].[XXX] (
[c] [varchar] (2) NOT NULL ,
[a] [numeric](14, 4) NULL ,
[numeric](14, 4) NULL )
2.表的数据 c a b
1 123 234
3.执行sql: select ((b-a)/b)*100 as ee from XXX
的结果:47.4358974358974358900
执行sql: select tt.ee from
( select ((b-a)/b)*100 as ee from XXX ) tt
结果:4.7435897435897435890
执行sql:
select * from
( select tt.ee from
( select ((b-a)/b)*100 as ee from XXX ) tt
) kk
的结果: .4743589743589743589
各位大侠试一试:谁能解释???????
CREATE TABLE [dbo].[XXX] (
[c] [varchar] (2) NOT NULL ,
[a] [numeric](14, 4) NULL ,
[numeric](14, 4) NULL )
2.表的数据 c a b
1 123 234
3.执行sql: select ((b-a)/b)*100 as ee from XXX
的结果:47.4358974358974358900
执行sql: select tt.ee from
( select ((b-a)/b)*100 as ee from XXX ) tt
结果:4.7435897435897435890
执行sql:
select * from
( select tt.ee from
( select ((b-a)/b)*100 as ee from XXX ) tt
) kk
的结果: .4743589743589743589
各位大侠试一试:谁能解释???????