`

sql语句 between-and

阅读更多
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,肯定是可以比较的

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics