select * from hd_sign t where trunc(createtime)=trunc(sysdate);
我现在查询的是,当天(2011.04.01)的信息,我想要查询出来2011年。03.31的信息记录,怎么用啊?
最好写成,当天的前一天,我不想要那种写死的代码。
因为我一次写好,永远使用
select * from hd_sign t where trunc(createtime)=trunc(sysdate);
我现在查询的是,当天(2011.04.01)的信息,我想要查询出来2011年。03.31的信息记录,怎么用啊?
最好写成,当天的前一天,我不想要那种写死的代码。
因为我一次写好,永远使用
select * from hd_sign t where createtime=sysdate-1;