A: insert into student(2018001,“张三”)
B: insert into student values(2018001,'张三')
C: insert into student(2018001,'张三')
D: insert into student values (2018001,“张三”)
举一反三
- 下列选项中,采用指定表的字段名的方式向表Student中添加id为1,name为”小王”的记录值的SQL语句是"( ) A: INSERT INTO Student(“id”,”name”) VALUES(1,”小王”); B: INSERT INTO Student(id,name) VALUES(1,’小王’); C: INSERT INTO Student VALUES(1,”小王”); D: INSERT INTO Student(id,”name”) VALUES(1,”小王”);
- 向student表插入一条新记录的正确SQL语句是( )。 A: APPEND INTO student VALUES(′0401′,′王芳’,′女′,18) B: APPEND student VALUES(′0401′,′王芳′,′女′,18) C: INSERT INTO student VALUES(′0401′,′王芳′,′女′,18) D: INSERT student VALUES(′0401′,′王芳′,′女′,18)
- 向student表插入一条新记录的正确SQL语句是______。 A: INSERT INTO student VALUES("0401","丽萍","女",18) B: APPEND student VALUES("0401","丽萍","女",18) C: APPEND INTO student VALUES("0401","丽萍","女",18) D: INSERT student VALUES("0401","丽萍","女",18)
- 在MySQL中,设有学生表Student(sno,sname,sage),各字段的含义分别是学生学号、姓名、年龄。下列语句会报错是________。 A: insert into Student(sno,sname,sage) values('201530','Jakc',18) B: insert into Student(sno,sname) values('201530','Jakc') C: insert into Student values('201530','Jakc') D: insert into Student values('201530','Jakc',18)
- 下列选项中,能够一次性向student表中添加三条记录的SQL语句是 A: INSERT INTO student VALUES (6,'lilei',99);(7,'hanmeimei',100);(8,'poly',40.5); B: INSERT INTO student VALUES (6,'lilei',99) (7,'hanmeimei',100) (8,'poly',40.5); C: INSERT INTO student VALUES (6,'lilei',99),(7,'hanmeimei',100),(8,'poly',40.5); D: INSERT INTO student VALUES (6,'lilei',99) VALUES(7,'hanmeimei',100) VALUES(8,'poly',40.5);
内容
- 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 )