• 2022-07-01
    表student中的包含两个字段,整型的id,字符串型的name。向表student中插入一条记录的正确SQL语句( )
    A: insert into student(2018001,“张三”)
    B: insert into student values(2018001,'张三')
    C: insert into student(2018001,'张三')
    D: insert into student values (2018001,“张三”)
  • B

    举一反三

    内容

    • 0

      表student中的包含两个字段,整型的id,字符串型的name。只显示表student中name列记录的SQL语句正确的是() A: select name from student B: select * from student C: select from name in student D: select name

    • 1

      修改表Student中姓名Name为“张三”的学生的专业Major改为“计算机” A: ALTER TABLE Student SET Name='张三' WHERE Major='计算机' B: UPDATE Student SET Name='张三' WHERE Major='计算机' C: UPDATE Student SET Major='计算机' WHERE Name='张三' D: ALTER TABLE Student SET Major='计算机' WHERE Name='张三'

    • 2

      表的创建命令:create table test( id int auto_increment primary key, name varchar(10) not null, password varchar(32) not null);如果在表中插入一条记录,语法正确的是: A: insert into test value(0,'张三',md5('123456')); B: insert into test values(0,张三,md5(123456)); C: insert into test value('张三',md5('123456')); D: insert into test values('张三',md5('123456'));

    • 3

      如果学生表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)

    • 4

      如果要为student 表增加一列,列名叫“telephone”,数据类型为可变长度字符串类型,那么利用SQL所写的语句是( ) A: alter table student add telephone varchar(10) B: insert student into values (telephone char(10)) C: add table student alter column telephone varchar(10) D: insert student telephone char(10 )