首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

sql话语 between-and

2012-08-25 
sql语句 between-andselect t.norm_id,sum(t.plan_revenue) from performance_group_statistic t where t.

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

热点排行