日期:2014-05-17  浏览次数:20729 次

时间查询问题
我想查询数据库中表中的数据,条件为系统日期的前一天的数据,这样的sql怎么写,高手帮忙啊

------解决方案--------------------
select * from table_name where col = trunc(sysdate - 1)
------解决方案--------------------
select * from tablename where date=(select to_char(sysdate-1, 'yyyy-mm-dd ') from dual)
已经验证过了。