select * from t_comm_businessmonth
where businessmonth =
to_date('2005-08-01', 'yyyy-mm-dd')是不是等同于SQL server 里的select * from t_comm_businessmonth
where Month(businessmonth) = 8
where businessmonth =
to_date('2005-08-01', 'yyyy-mm-dd')是不是等同于SQL server 里的select * from t_comm_businessmonth
where Month(businessmonth) = 8
select * from t_comm_businessmonth
where businessmonth =
to_date('2005-08-01', 'yyyy-mm-dd')
是取businessmonth 为2005年8月1日 零时零分零秒的数据
select * from t_comm_businessmonth
where Month(businessmonth) = 8
是到businessmonth 为8月的数据,不管是哪一年的
SQL Server
select * from t_comm_businessmonth
where Month(businessmonth) = 8 and Year(businessmonth) = 2005Oracle 怎么写?
where to_char(businessmonth,'yyyymm' ='200508'
select * from t_comm_businessmonth
where to_char(businessmonth,'yyyy-mm') ='2005-08';