如果学生表STUDENT是使用下面的SQL语句创建的CREATE TABLE STUDENT (SNO C (4) PRIMARY KEY NOT NULL , ;SN C (8) , ;SEX C (2) , ;AGE N (2) CHECK (AGE>15 AND AGE<30 ))下面的SQL语句中可以正确执行的是A)INSERT INTO STUDENT(SNO,SEX,AGE)VALUES("S9","男",17)B)INSERT INTO STUDENT(SN,SEX,AGE)VALUES("

题目

如果学生表STUDENT是使用下面的SQL语句创建的CREATE TABLE STUDENT (SNO C (4) PRIMARY KEY NOT NULL , ;SN C (8) , ;SEX C (2) , ;AGE N (2) CHECK (AGE>15 AND AGE<30 ))下面的SQL语句中可以正确执行的是A)INSERT INTO STUDENT(SNO,SEX,AGE)VALUES("S9","男",17)B)INSERT INTO STUDENT(SN,SEX,AGE)VALUES("李安琦","男",20)C)INSERT INTO STUDENT(SEX,AGE)VALUES("男",20)D)INSERT INTO STUDENT(SNO,SN) VALUES("S9","安琦",16)


相似考题
更多“如果学生表STUDENT是使用下面的SQL语句创建的CREATE TABLE STUDENT (SNO C (4) PRIMARY KEY ”相关问题
  • 第1题:

    如果学生表STUDENT是使用下面的SQL语句创建的CREATE TABLE STUDENT(SNO C(4)PRIMARY KEY NOT NULL,; SN C(8),; SEX C(2),; AGE N(2)CHECK(AGE>15 AND AGE<30))下面的SQL语句中可以正确执行的是

    A.INSERT INTO STUDENT(SNO,SEX,AGE)VALUES(“S9”,“男”,17)

    B.INSERT INTO STUDENT(SN,SEX,AGE)VALUES(“李安琦”,“男”,20)

    C.INSERT INTO STUDENT(SEX,AGE)VALUES(“男”,20)

    D.INSERT INTO STUDENT(SNO,SN)VALUES(“S9”,“安琦”,16)


    正确答案:A
    解析:题干中创建表的SQL语句使用了短语PRIMARY KEY,将SNO字段规定为主索引字段,同时使用短语NOT NULL,规定在该字段中不允许出现空值,因此选项B、C都是错误的;而选项D的错误在于,语句中的VALUES后面所描述的插入记录值,与题干中所创建的字段不符;正确选项为A,能够实现插入记录的操作。

  • 第2题:

    下面的SQL语句也可以用带Join关键词的语句来实现。 Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC,Student Where SC.Sno=Student.Sno


    正确

  • 第3题:

    9、将SC和Student表连接起来,显示学生的学号、姓名、课程号、考试分数,不正确的SQL语句是()。

    A.Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC,Student Where SC.Sno=Student.Sno

    B.Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC Join Student On SC.Sno=Student.Sno

    C.Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From Student Join SC On SC.Sno=Student.Sno

    D.Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC,Student On SC.Sno=Student.Sno


    Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC,Student On SC.Sno=Student.Sno

  • 第4题:

    如果学生表STUDENT是使用下面的SQL语句创建的:

    CREATE TABLE STUDENT(SNO C(4) PRIMARY KEY NOT NULL,,;

    SN C(8),;

    SEX C(2),;

    AGE N(2) CHECK(AGE>15 AND AGE<30))

    下面的SQL语句中可以正确执行的是( )。

    A

    A.B

    B.C

    C.D

    D.答案


    正确答案:N

  • 第5题:

    将SC和Student表连接起来,显示学生的学号、姓名、课程号、考试分数,不正确的SQL语句是()。

    A.Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC,Student Where SC.Sno=Student.Sno

    B.Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC Join Student On SC.Sno=Student.Sno

    C.Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From Student Join SC On SC.Sno=Student.Sno

    D.Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC,Student On SC.Sno=Student.Sno


    Select Student.Sno,Student.Sname, SC.Cno,SC.Grade From SC,Student On SC.Sno=Student.Sno