select * from table where time<"2006-09-12 00:00:00"
新的项目,后台用了Oracle,刚才在jsp中执行sql语句,后台一直报500错误,System.out一些变量发现,这种sql的写法检索不出内容了。查手册,查baidu,原来在oracle中进行时间比较的sql语句要用另一种写法了:select * from oracletable where time<to_date("2006-09-12 00:00:00","yyyy-mm-dd hh24:mi:ss")
这样来执行,搞定。突然感觉,开发路漫漫,时刻都能遇到问题,任何小的地方都要注意。