17,377
社区成员
发帖
与我相关
我的任务
分享
if :shegnxiao=1 then
SELECT * FROM table1
WHERE ttime >= to_date('2011-05-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
else null
end if;
--
SELECT * FROM table1
WHERE
decode(:shegnxiao,
1,ttime >= to_date('2011-05-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')
null
)