现有客户表customers(主键:客户编号cid),包含10行数据,订单表orders(外键:客户编号cid),包含6条数据。执行sql语句:select * from customers right outer join orders on customers.cid=orders.cid。最多返回()条记录
现有客户表customers(主键:客户编号cid),包含10行数据,订单表orders(外键:客户编号cid),包含6条数据。执行sql语句:select * from customers right outer join orders on customers.cid=orders.cid。最多返回()条记录
客户表 customers 包含字段 : 客户编号 cid 和名称 cname,订单表 orders
客户表 customers 包含字段 : 客户编号 cid 和名称 cname,订单表 orders
用SQL语句实现教材第2章综合题第4题中的7个查询。完成第3个查询。在“(____)”内填答案。select Cname from Customers (____) Orders (____) Products pwhere c. Cid=o. Cid and p. Cid=o. Cid and Price=(____)(____) by Cnamehaving (____) > 500
用SQL语句实现教材第2章综合题第4题中的7个查询。完成第3个查询。在“(____)”内填答案。select Cname from Customers (____) Orders (____) Products pwhere c. Cid=o. Cid and p. Cid=o. Cid and Price=(____)(____) by Cnamehaving (____) > 500
查询选修了a001号课程的学生的最高成绩() A: select cid, max(grade) from course where cid=’a001’ group by cid B: select cid,max(grade) from student where cid=’a001’ group by cid C: select cid, max(grade) from sc where cid=’a001’ group by cid D: select cid, max(grade) from student group by cid having cid=’a001’
查询选修了a001号课程的学生的最高成绩() A: select cid, max(grade) from course where cid=’a001’ group by cid B: select cid,max(grade) from student where cid=’a001’ group by cid C: select cid, max(grade) from sc where cid=’a001’ group by cid D: select cid, max(grade) from student group by cid having cid=’a001’
统计选修了a001课程的学生的平均成绩( ) A: select cid,avg(grade) from student group by cid having cid=’a001’ B: select cid,avg(grade) from student where cid=’a001’ group by cid C: select cid,avg(grade) from course where cid=’a001’ group by cid D: select cid,avg(grade) from sc where cid=’a001’ group by cid
统计选修了a001课程的学生的平均成绩( ) A: select cid,avg(grade) from student group by cid having cid=’a001’ B: select cid,avg(grade) from student where cid=’a001’ group by cid C: select cid,avg(grade) from course where cid=’a001’ group by cid D: select cid,avg(grade) from sc where cid=’a001’ group by cid
按课程号分类,统计相应的选课人数() A: select cid, count(distinct sid) from sc group by cid B: select cid, count(*) from student group by cid C: select cid, count(distinct cid) from sc group by cid D: select cid, count(distinct sid) from student group by cid
按课程号分类,统计相应的选课人数() A: select cid, count(distinct sid) from sc group by cid B: select cid, count(*) from student group by cid C: select cid, count(distinct cid) from sc group by cid D: select cid, count(distinct sid) from student group by cid
【单选题】假设订单表 orders 用于存储订单信息, cid 代表客户编号, money 代表单次订购额,现要查询每个客户的订购次数和每个客户的订购总金额,则下列() SQL 语句可以返回正确的结果。 A. select cid,count(distinct(cid)),sum(money) from ordersgroup by cid B. select cid , count(distinct(cid)) , sum(money) fromorders order by cid C. select cid , count(cid) , sum(money) from orders orderby cid D. select cid , count(cid) , sum(money) from orders groupby cid
【单选题】假设订单表 orders 用于存储订单信息, cid 代表客户编号, money 代表单次订购额,现要查询每个客户的订购次数和每个客户的订购总金额,则下列() SQL 语句可以返回正确的结果。 A. select cid,count(distinct(cid)),sum(money) from ordersgroup by cid B. select cid , count(distinct(cid)) , sum(money) fromorders order by cid C. select cid , count(cid) , sum(money) from orders orderby cid D. select cid , count(cid) , sum(money) from orders groupby cid
DeviceNet是基于连接的网络,下列属于报文组1的连接标识符(CID)是()。 A: CID=300 hex B: CID=400 hex C: CID=500 hex D: CID=600 hex
DeviceNet是基于连接的网络,下列属于报文组1的连接标识符(CID)是()。 A: CID=300 hex B: CID=400 hex C: CID=500 hex D: CID=600 hex
为salerecord表CID字段添加外键,引用client表中CID字段。 A: ALTER TABLE salerecord ADD CONSTRAINT fk1 FOREIGN KEY(CID) REFERENCES client(CID); B: ALTER TABLE salerecord ADD CONSTRAINT pk1 PRIMARY KEY(CID) REFERENCES client(CID); C: ALTER TABLE salerecord ADD CONSTRAINT fk1 FOREIGN KEY(CID) REFERENCES client(CID),ADD CONSTRAINT pk2 PRIMARY KEY(GID) REFERENCES goods(GID); D: ALTER TABLE salerecord ADD CONSTRAINT pk1 PRIMARY KEY(CID) REFERENCES client(CID),ADD CONSTRAINT pk2 PRIMARY KEY(GID) REFERENCES goods(GID);
为salerecord表CID字段添加外键,引用client表中CID字段。 A: ALTER TABLE salerecord ADD CONSTRAINT fk1 FOREIGN KEY(CID) REFERENCES client(CID); B: ALTER TABLE salerecord ADD CONSTRAINT pk1 PRIMARY KEY(CID) REFERENCES client(CID); C: ALTER TABLE salerecord ADD CONSTRAINT fk1 FOREIGN KEY(CID) REFERENCES client(CID),ADD CONSTRAINT pk2 PRIMARY KEY(GID) REFERENCES goods(GID); D: ALTER TABLE salerecord ADD CONSTRAINT pk1 PRIMARY KEY(CID) REFERENCES client(CID),ADD CONSTRAINT pk2 PRIMARY KEY(GID) REFERENCES goods(GID);
按照课程号进行分组,统计学生平均成绩大于60分的学生的信息( ) A: select cid,avg(grade) from sc group by cid having avg(grade)>60 B: select cid,avg(grade) from student group by cid having avg(grade)>60 C: select cid,avg(grade) from course where avg(grade)>60 group by cid D: select cid,avg(grade) from student where avg(grade)>60 group by cid
按照课程号进行分组,统计学生平均成绩大于60分的学生的信息( ) A: select cid,avg(grade) from sc group by cid having avg(grade)>60 B: select cid,avg(grade) from student group by cid having avg(grade)>60 C: select cid,avg(grade) from course where avg(grade)>60 group by cid D: select cid,avg(grade) from student where avg(grade)>60 group by cid