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
内容
- 0
下列语句说法正确的是 A: select * from user limit 2,-1; 检索数据表第3行到结束所有的记录 B: select * from user limit 2,-1; 检索数据表第3行之前的所有记录 C: select * from user limit 2,5; 检索数据表第3-7行记录 D: select * from user limit 2,5; 检索数据表第2-5行记录
- 1
数据表如图所示,列出客户订单总金额大于3000的数据,正确的SQL是________[img=1101x418]1803c6faf3915a8.png[/img] A: SELECT C_ID,SUM(OrderAmount) FROM Orders GROUP BY C_ID HAVING SUM(OrderAmount)>3000 B: SELECT C_ID,SUM(OrderAmount) FROM Orders WHERE SUM (OrderAmoount)>3000 GROUP BY C_ID C: SELECT C_ID,SUM(OrderAmount) FROM Orders WHERE SUM (OrderAmoount)>3000 D: SELECT C_ID,SUM(OrderAmount) FROM Orders GROUP BY C_ID WHERE SUM(OrderAmount)>3000
- 2
SQL数据库中查询前3条记录的SQL语句是()。 A: select top 3 from table B: select * from table limit 3 C: select * from table limit 1,3 D: select * from table order 3
- 3
以下______语句查询表student中第3条到第10条记录 。 A: SELECT * FROM student LIMIT 2,8; B: SELECT * FROM student LIMIT 2,9; C: SELECT * FROM student LIMIT 3,10; D: SELECT * FROM student LIMIT 3,9;
- 4
【单选题】以下语句能返回记录数大于5行的是() A. select * from table limit 5 B. select * from table limit 0,5 C. select * from table limit 5,10 D. select * from table limit 10,5