/*人员:LDH功能:SQL-简单查询日期:2018-7-18*/USE TSQLFundamentals2008; GO-- Select some columns' information. SELECT empid,lastname,firstname,address,city,country FROM HR.Employees;-- GROUP BY SELECT '国家' = country,COUNT(1) AS '员工个数' FROM HR.Employees GROUP BY country;-- Expression SELECT '订单日期' = orderdate,YEAR(orderdate) AS '订单年份' FROM Sales.Orders;
转载于:https://www.cnblogs.com/LifeDecidesHappiness/p/9328649.html