有张表a,数据如下:
s b
50 69
260 295要求是b字段比s字段多60%的列出来
select * from a where b>s*(1+0.6)但如果用下面的为什么不行?select * from a where b>s*(1+60/100)
s b
50 69
260 295要求是b字段比s字段多60%的列出来
select * from a where b>s*(1+0.6)但如果用下面的为什么不行?select * from a where b>s*(1+60/100)
select * from a where b>s*(1+(cast 60 as varchar)/100)
select * from a where b>s*(1+(cast 60 as float)/100)