注:time字段类型 在sqlserver2000中为datatime,在oracle10g中为data,
请问在sqlserver2000中这两句是等价的么?select * from table where time>'2006-09-12 00:00:00'select * from table where time>'2006-09-12'如果换成oralce10g 我想写等价这句select * from table where time>'2006-09-12'的sql
是这样写么?select * from oracletable where time<to_date('2006-09-12','yyyy-mm-dd')
请问在sqlserver2000中这两句是等价的么?select * from table where time>'2006-09-12 00:00:00'select * from table where time>'2006-09-12'如果换成oralce10g 我想写等价这句select * from table where time>'2006-09-12'的sql
是这样写么?select * from oracletable where time<to_date('2006-09-12','yyyy-mm-dd')
select * from table where time>'2006-09-12'里的字符串会隐式转换为'2006-09-12 00:00:00'
oralce10g 不懂,你该去oralce板块问问。
select * from table where time>'2006-09-12 00:00:00'select * from table where time>'2006-09-12'
oracle to_date()转化日期函数。
1、MSSQL
select * from table where time>'2006-09-12 00:00:00'
select * from table where time>'2006-09-12'等价的。理由同楼上。
楼主方法没有问题。