另一题: select decode(abs(a-b),a-b,a,b), decode(abs(b-c),b-c,b,c) from table;
selecty * from tb_table where time BETWEEN '2005-1-1' AND '2005-10-30'!LZ 加油!
//SQL查询当天的数据 select * from 表 where DateDiff(dd,datetime,getdate())=0; //SQL查询当天24小时的数据 select * from 表 where DateDiff(dd,datetime,getdate())=24;select Case when A>B Then A else Case where B>C Then B else c end end From 表
select decode(abs(a-b),a-b,a,b),
decode(abs(b-c),b-c,b,c)
from table;
select * from 表 where DateDiff(dd,datetime,getdate())=0;
//SQL查询当天24小时的数据
select * from 表 where DateDiff(dd,datetime,getdate())=24;select Case when A>B Then
A
else Case where B>C Then
B
else
c
end
end
From 表