在student表的sno列上建立索引stu_sno_index;Createindexstu_sno_indexonstudent.sno;()
举一反三
- 如果在“学生-课程”数据库中,希望当删除Student表中的元组时,级联删除SC表中相应的元组,则在定义SC表时,应有语句____________________。 A: FOREIGN KEY (Sno) ON DELETE CASCADE Student(Sno) B: FOREIGN KEY (Sno) ON DELETE NO ACTION Student(Sno) C: FOREIGN KEY (Sno) REFERENCES Student(Sno) ON DELETE NO ACTION D: FOREIGN KEY (Sno) REFERENCES Student(Sno) ON DELETE CASCADE
- 下列 SQL 语句select * from student where sno = '05880101'union select * from student where sno = '05880102'与此查询语句等价的选项是( )。 A: select * from student where sno= '05880101' and sno= '05880102' B: select * from student where sno= '05880101' or sno= '05880102' C: select * from student where sno= '05880101' D: select * from student where sno= '05880102'
- 查询选课门数大于3门的同学学号,姓名, 选课门数Select ______________from student s, scwhere s.sno=sc.sno group by __________having _____________ A: sno, sname, count(*) ; sno, sname; count(*)>3 B: sno, sname, count(*) ; sno; count(*)>3 C: sno, sname, count(cno) ; sno; count(cno)>3 D: sno, sname, count(sno) ; sno; count(sno)>3
- 下列SQL语句中,能够实现“收回用户user1对学生表中学号的修改权限”的是( )。 A: REVOKE UPDATE on student(sno) from ALL B: REVOKE UPDATE on student(sno) from user1 C: REVOKE UPDATE(sno) on student from user1 D: REVOKE UPDATE(sno) on student from PUBLIC
- 删除触发器tri—Sno的正确命令是——。 A: REMOVETRIGGERtri—Sno B: DROPTRIGGERtri—Sno C: TRUNCATEFRIGGERtri—Sno D: DELETETRIGGERtri—Sno