在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下()SQL语句可以实现查询没有选修'C002'号课程的学生姓名。
A. select sname from student, sc where student.sno=sc.sno and cno !='C002'
B. select sname from student where sno not in (select sno from sc where cno='C002')
C. select sname from student where exixts (select * from sc where student.sno=sc.sno and cno<>'C002')
D. select sname from student where not exixts (select * from sc where student.sno=sc.sno and cno='C002')
在学生选课数据库中有学生表student(sno,sname,ssex,sage,sdept),课程表course(cno,cname)及学生选课表sc(sno,cno,grade),其中sno是学号,sname是姓名,ssex是性别,sage是年龄,sdept是系别,cno是课程号,cname是课程名,grade是成绩。以下()SQL语句可以实现查询“CS”系并且年龄超过20岁的学生姓名。
A. select sname from student where sdept=’CS‘ and sage>20
B. select sname from student where sdept=’CS‘intersectselect sname from student wheresage>20
C. select sname from student where sdept=’CS‘exceptselect sname from student wheresage<=20
D. select sname from student where sdept=’CS‘unionselect sname from student wheresage>20
在bookshop数据库中有5 个表,这五个表的结构描述见“实验数据库描述”。其中员工表employee(emp_no,emp_name,sex,dept,title,date_hired,birthday,salary,telephone,addr),客户表customer(cust_name,receiver,tel_no,cust_Addr),图书表books(book_no,book_name,price,book_type,ISBN),销售主表sales(order_no,cust_name,sale_id,total_amt,order_date),销售明细表sale_item(order_no,book_no,qty,unit_price)。以下操作不能正确执行的是()。
A. insert into books values('20888',34.5,'C
B. 程序设计','计算机','97810345678')
C. 假设书号为20652的图书已经被选购了。delete from bookswhere book_no='20652'
D. 假设books表中并没有编号为20888的图书。update sale_itemset book_no='20888'where order_no='102893'
E. update booksset price='abc'where book_no='20652'