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

ORA-00933:SQL命令未正确结束

2014-01-28 
GROUP BY 在SQL Worksheek中运行出错,select * from aa where nm like %ph%可以正常运行显示 但用 select

GROUP BY 在SQL Worksheek中运行出错,

select *
from aa
where nm like '%ph%'  可以正常运行显示

但用

select BH,NM,SUM(PQ) AS PQ,SUM(SLBH) AS SLBH
from aa
GROUP BY BH,NM
where nm like '%ph%'  提示ORA-00933:SQL命令未正确结束,我的语句有问题还是ORACLE有别于SQL SERVER 2000的语法格式



------解决方法--------------------------------------------------------

SQL code
select BH,NM,SUM(PQ) AS PQ,SUM(SLBH) AS SLBHfrom aawhere nm like '%ph%'  GROUP BY BH,NM
------解决方法--------------------------------------------------------
SQL code
select BH,NM,SUM(PQ) AS PQ,SUM(SLBH) AS SLBH from aa where nm like '%ph%'GROUP BY BH,NM

        

热点排行