关于SQL语句的注意事项

group by 语句里面不可以使用别名,例如

SELECT Customer,SUM(OrderPrice) FROM Orders GROUP BY Customer

但是不可以:

SELECT Customer AS cus , SUM(OrderPrice) FROM Orders GROUP BY cus

  

 

posted @ 2017-07-31 16:00  DIMSUMBOY  阅读(268)  评论(0编辑  收藏  举报