当前位置: 代码迷 >> SQL >> sql话语 between-and
  详细解决方案

sql话语 between-and

热度:107   发布时间:2016-05-05 13:41:26.0
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,肯定是可以比较的

  相关解决方案