单项选择题
现有客户表customers(主键:客户编号cid),包含10行数据,订单表orders(外键:客户编号cid),包含6条数据。执行sql语句:select * from customers right outer join orders on customers.cid=orders.cid。最多返回()条记录。
A.10
B.6
C.4
D.0
点击查看答案&解析
相关考题
-
单项选择题
家庭住址最好采用()数据类型进行存储。
A.Char/Nchar
B.text/Ntext
C.Varchar/Nvarchar
D.Char2/Nchar2 -
单项选择题
Sql server提供了一些系统函数,以下说法错误的是()。
A.selectdatalength(‘abcde’)返回值为:5
B.selectconvert(char(3),12345) ;返回值为:123
C.selectconvert(char(5),12345) ;返回值为:12345 -
单项选择题
假设订单表orders用来存储订单信息,cid代表客户编号,money代表单次订购额,现要查询每个客户的订购次数和每个客户的订购总金额,下面()sql语句可以返回正确结果。
A.select cid,count(distinct(cid)),sum(money) from orders group by cid
B.select cid,count(distinct(cid)),sum(money) from orders order by cid
C.select cid,count(cid),sum(money) from orders order by cid
D.select cid,count(cid),sum(money) from orders group by cid
