现在需要查询unit表中,在information表中有的unit_name,是否存在重复的数据。以下哪些逻辑可以实现?
A. select name,count(*) from unit u where u.name in (select unit name from informati on i where i.unit name = u.name)group by u.name having count(*) > 1; 。
B. select name,count(1) from unit u join inf ormation i on u.unit name=.unit name group by name where count(1) >1;
C. select name,count(*) from unit u where exists (select 1 from information i where i.unit_name = u.name)group by name having count(*) > 1;
D. select name,count(1) from unit u join inf ormation i on u.unit name=.unit name :
score表中存储了学生的学号、课程号、平时成绩和期末成绩,如果需要查询学号分别为的1111、2222和3333的学生学号、课程号、平时成绩和期末成绩。以下逻辑中可以实现的是?
A. select studentno, courseno, daily, finalfrom score where studentno ='1111' and studentno ='2222' and studentno ='3333');
B. select studentno, courseno, daily, finalfrom score where studentno in ('1111' .2222'3333"*);
C. select studentno, courseno, daily, finalfro score where studentno>=111;
D. select studentno, courseno, daily, finalfrom score where studentno = '1111' or stude ntno = 2222' or studentno = 33331):
score 表中存储了学生的学号、期末成绩,如果需要查询期末成绩在85到90之间的学生及成绩,以下可以实现的是?
A. select studentno,finalfrom score where final between 85 and 90;
B. select studentno,finalfrom score where final between 85 and 91;
C. select studentno,finalfrom score where final between 84 and 90;
D. select studentno,finalfrom score where final>=85 and final<= 90;
查询sale_detail表的region为杭州地区和上海地区的所有记录,并将它们合并起来。下列语句可以实现的是?
A. Select * from sale detail where region= hangzhou'unionSelect * from sale detailwhere region = shanghai;
B. Select * from sale detail where region= 'hangzhou'union allSelect * from sale detail where region = shanghai;
C. Select * from sale_ detail where region='hangzhou' and region='shanghai";
D. Select * from sale detail where region in('hangzhou', 'shanghai');