sql語句 between-and

luxika發表於2012-02-29
select t.norm_id,sum(t.plan_revenue) from performance_group_statistic t
where t.performance_date between to_date('2012-01-01','yyyy-mm-dd')
and to_date('2012-04-01','yyyy-mm-dd') group by t.norm_id

在Mysql中select * from user where birthday between '1980-01-01' and '1981-01-01';


如果傳的是字串,比如在oracle中,用to_date()轉換後再用between ... and,肯定是可以比較的