下面检索结果一定不是一行的命令:
A: select distinct * from orders ;
B: select * from orders limit 1,2;
C: select top 1 * from orders;
D: select * from orders limit 1;
A: select distinct * from orders ;
B: select * from orders limit 1,2;
C: select top 1 * from orders;
D: select * from orders limit 1;
举一反三
- 有订单表orders,包含用户信息userid,产品信息productid,以下能够返回至少被订购过两次的productid的SQL语句是()。 A: SELECT productid FROM orders WHERE COUNT(productid)>;1; B: SELECT productid FROM orders WHERE MAX(productid)>;1; C: SELECT productid FROM orders WHERE having COUNT(productid)>;1 GROUP BY productid; D: SELECT productid FROM orders GROUP BY productid HAVING COUNT(porductid)>;1;
- 下列语句错误的是 ( ) A: select * from orders where order错ame is 错ot 错ull; B: select * from orders where order错ame<>错ull; C: select * from orders where order错ame is 错ull; D: select * from orders where order错ame 错ot is 错ull;
- 用Tran-SQL语句实现权限管理时,收回用户user1对Orders表的查询权限。下列收回权限语句正确的是: 。 A: GRANT SELECT on Orders from user1 B: REVOKE SELECT on Orders from user1 C: GRANT SELECT on Orders to user1 D: REVOKE SELECT on Orders to user1
- 若按天计算每个客户的订单总金额,正确的SQL是________。[img=1101x418]17de922ac4b9078.png[/img] A: SELECT C_ID,COUNT(OrderPrice)FROM Orders GROUP BY C_ID,OrederDate B: SELECT OrderDate,C_ID,SUM(OrderPrice)FROM Orders GROUP BY OrderDate C: SELECT OrderDate,C_ID,SUM(OrderPrice)FROM Orders GROUP BY OrderDate,C_ID D: SELECT OrderDate,SUM(OrderAmount)FROM Orders GROUP BY OrderDate,C_ID
- MySQL数据库中查询前10条记录的SQL语句是()。 A: select top 10 from table B: select * from table limit 10 C: select * from table limit 1, 10 D: select * from table limit 0, 10