要是时间是char型:
select sun(本月用量) from table
where substr(时间,6,2)=‘‘07’’//Oracle
where substring(时间,6,2)=‘‘07’’//Sybase.sql Server
group by 表号;
select sun(本月用量) from table
where substr(时间,6,2)=‘‘07’’//Oracle
where substring(时间,6,2)=‘‘07’’//Sybase.sql Server
group by 表号;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货