• 2022-06-09 问题

    下列 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'

    下列 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'

  • 2022-06-15 问题

    ​如果在“学生-课程”数据库中,希望当删除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

    ​如果在“学生-课程”数据库中,希望当删除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

  • 2022-07-23 问题

    创建学生表:CREATE TABLE Student([br][/br]Sno char(6),[br][/br]Sname varchar(8),[br][/br]Ssex char(2),[br][/br]Sbirth DATE,[br][/br]Sdept varchar(30)[br][/br]);[br][/br]现在要添加主键的代码正确的是( )。 A: ALTER TABLE student ADD PRIMARY KEY(Sno); B: ALTER TABLE student ADD PRIMARY KEY Sno ; C: ALTER TABLE student ADD unique (Sno); D: ALTER TABLE student PRIMARY KEY(Sno);

    创建学生表:CREATE TABLE Student([br][/br]Sno char(6),[br][/br]Sname varchar(8),[br][/br]Ssex char(2),[br][/br]Sbirth DATE,[br][/br]Sdept varchar(30)[br][/br]);[br][/br]现在要添加主键的代码正确的是( )。 A: ALTER TABLE student ADD PRIMARY KEY(Sno); B: ALTER TABLE student ADD PRIMARY KEY Sno ; C: ALTER TABLE student ADD unique (Sno); D: ALTER TABLE student PRIMARY KEY(Sno);

  • 2022-07-23 问题

    如果学生表STUDENT是使用下面的SQL语句创建的CREATE TABLE STUDENT( SNO varchar(4) PRIMARY KEY,SNAME varchar(8),SEX char(2),AGE int CHECK(AGE>15 AND AGE<30))则下面的语句中可以正确执行的是( )。 A: INSERT INTO STUDENT(SNO,SEX,AGE)values(‘S9’, ’男’, 17) B: INSERT INTO STUDENT(SNO,SEX,AGE)values(‘S9’, ‘男’, 14) C: INSERT INTO STUDENT(SNO,SEX,AGE)values(‘男’, 20) D: INSERT INTO STUDENT(SNO,SEX,AGE)values(‘S9’,‘安琦’, 16)

    如果学生表STUDENT是使用下面的SQL语句创建的CREATE TABLE STUDENT( SNO varchar(4) PRIMARY KEY,SNAME varchar(8),SEX char(2),AGE int CHECK(AGE>15 AND AGE<30))则下面的语句中可以正确执行的是( )。 A: INSERT INTO STUDENT(SNO,SEX,AGE)values(‘S9’, ’男’, 17) B: INSERT INTO STUDENT(SNO,SEX,AGE)values(‘S9’, ‘男’, 14) C: INSERT INTO STUDENT(SNO,SEX,AGE)values(‘男’, 20) D: INSERT INTO STUDENT(SNO,SEX,AGE)values(‘S9’,‘安琦’, 16)

  • 2021-04-14 问题

    中国大学MOOC: 将Student表中的Sno属性定义为主码,下面空格处应填写( )。Create Table Student (Sno char(9) , Sname char(20) Not Null, Sex Char(2) )

    中国大学MOOC: 将Student表中的Sno属性定义为主码,下面空格处应填写( )。Create Table Student (Sno char(9) , Sname char(20) Not Null, Sex Char(2) )

  • 2022-06-06 问题

    下列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

    下列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

  • 2022-06-16 问题

    查找学生表student中姓名的第二个字为“t”的学生学号sno和姓名sname,下面SQL语句正确的是()。 A: SELECT sno, sname FROM student WHERE sname='_t%'; B: SELECT sno, sname FROM student WHERE sname LIKE '_t%'; C: SELECT sno, sname FROM student WHERE sname='%t_'; D: SELECT sno, sname FROM student WHERE sname LIKE '%t_';

    查找学生表student中姓名的第二个字为“t”的学生学号sno和姓名sname,下面SQL语句正确的是()。 A: SELECT sno, sname FROM student WHERE sname='_t%'; B: SELECT sno, sname FROM student WHERE sname LIKE '_t%'; C: SELECT sno, sname FROM student WHERE sname='%t_'; D: SELECT sno, sname FROM student WHERE sname LIKE '%t_';

  • 2022-06-16 问题

    对于学生信息表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是 A: SELECT sno,sname FROM student WHERE grade=NULL B: SELECT sno,sname FROM student WHERE grade IS NULL C: SELECT sno,age FROM student WHERE grade IS NULL D: SELECT sno,age FROM student WHERE grade=NULL

    对于学生信息表:student(sno,sname,sex,age,grade),查询学习成绩为空的学生的学号和姓名,下面语句正确的是 A: SELECT sno,sname FROM student WHERE grade=NULL B: SELECT sno,sname FROM student WHERE grade IS NULL C: SELECT sno,age FROM student WHERE grade IS NULL D: SELECT sno,age FROM student WHERE grade=NULL

  • 2022-10-26 问题

    在学生选课数据库中,查询选修了课程的学生的学号、姓名,SQL语句可为( ) A: SELECT DISTINCT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; B: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; C: SELECT DISTINCT Sno, DISTINCT Sname FROM Student WHERE Student.Sno IN (SELECT Sno FROM SC); D: SELECT Sno, Sname FROM Student WHERE Student.Sno IN (SELECT DISTINCT Sno FROM SC);

    在学生选课数据库中,查询选修了课程的学生的学号、姓名,SQL语句可为( ) A: SELECT DISTINCT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; B: SELECT Sno, Sname FROM Student, SC WHERE Student.Sno = SC.Sno; C: SELECT DISTINCT Sno, DISTINCT Sname FROM Student WHERE Student.Sno IN (SELECT Sno FROM SC); D: SELECT Sno, Sname FROM Student WHERE Student.Sno IN (SELECT DISTINCT Sno FROM SC);

  • 2021-04-14 问题

    select * from student where sno=’05880101’ union select * from student where sno=’05880102’ 与此查询语句等价的选项是( )。

    select * from student where sno=’05880101’ union select * from student where sno=’05880102’ 与此查询语句等价的选项是( )。

  • 1 2 3 4 5 6 7 8 9 10