A: INSERT INTO test(“id”,”name”) VALUES(1,"小王");
B: INSERT INTO test VALUE(1,"小王");
C: INSERT INTO test VALUES(1, '小王');
D: INSERT INTO test(id,name)VALUES(1, '小王');
举一反三
- 下列选项中,采用指定表的字段名的方式向表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中添加id为1,name为”小王”的记录,正确的SQL语句是 A: INSERTINTOStudent(“id”,”name”)VALUES(1,”小王”); B: INSERTINTOStudentVALUE(1,”小王”); C: INSERTINTOStudentVALUES(1,’小王’); D: INSERTINTOStudent(id,name)VALUES(1,’小王’);
- 表的创建命令: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'));
- 下列选项中,采用不指定表的字段名的方式向表user中添加id为2,name为”小明”的记录,正确的SQL语句是 A: INSERT INTO user(“id”,”name”) VALUES(2,”小明”); B: INSERT INTO user VALUE(2,”小明”); C: INSERT INTO user VALUES(2,’小明’); D: INSERT INTO user(id,name) VALUES(2,’小明’);
- 某个表有两个字段,使用insert语句插入数据正确的是() A: insert into 表名 values(字段名1对应的值); B: insert into 表名(字段1,字段2) values(字段名1对应的值,字段名2对应值); C: insert into 表名(字段名1) value (字段名1对应的值); D: insert into 表名(字段名1,字段名2) values(字段名2对应的值,字段名1对应值);
内容
- 0
现有表book,字段:id(int),title(varchar),price(float);其中id字段设为主键,使用insert语句向book表中插入数据,以下语句正确的是 A: insert into book(title,price) values('java',100) B: c)insert into book values('java',100) C: insert book values('java',100) D: insert into book(id,title,price) values(1,'java',100)
- 1
下列选项中,采用指定表的所有字段名的方式向表Student中添加id为1,name为”小王”的记录值的SQL语句是
- 2
现有表 book,字段:id (int),title (varchar), price(float); 其中 id 字段设为主键,使用 insert 语句向 book 表中 插入数据,以下语句错误的是( )。 A: insert into book (id,title,price) values(1,'java',100) B: insert into book (title,price) values('java',100) C: insert into book values ('java',100) D: insert book values('java',100)
- 3
hive里创建表test,表里添加两个字段id和name,以下哪个HQL是正确的( ) A: create test(id int, name string); B: create test(int id, string name); C: create table test(int id, string name); D: create table test(id int, name string)
- 4
下面插入记录的语法格式正确的是 A: insert from 表名 (字段1,字段2,…) values(值1,值2,…) B: insert into 表名 (字段1,字段2,…) values(值1,值2,…) C: insert where 表名 (字段1,字段2,…) values(值1,值2,…) D: insert into from 表名 (字段1,字段2,…) values(值1,值2,…)