下列哪些是正确的?(多选)
A: SQL语句:select * from mess where height>1.6 and height<=1.8
是查询mess表中字段(列)height值在1.6和1.8之间的记录(记录的各个列值都要)。
B: SQL语句 select * from mess where name like '%林%'是查询mess表中字段(列)name值等于“林”的记录(记录的各个列值都要)。
C: SQL语句 update mess set height =1.77 where name='张三'
是将mess表中name字段(列)值是张三的记录(行)的height的值更新为1.77。
D: SQL语句 insert into mess values
('R1008','将林','2010-12-20',1.66),('R1008','秦仁','2010-12-20',1.66)
A: SQL语句:select * from mess where height>1.6 and height<=1.8
是查询mess表中字段(列)height值在1.6和1.8之间的记录(记录的各个列值都要)。
B: SQL语句 select * from mess where name like '%林%'是查询mess表中字段(列)name值等于“林”的记录(记录的各个列值都要)。
C: SQL语句 update mess set height =1.77 where name='张三'
是将mess表中name字段(列)值是张三的记录(行)的height的值更新为1.77。
D: SQL语句 insert into mess values
('R1008','将林','2010-12-20',1.66),('R1008','秦仁','2010-12-20',1.66)
举一反三
- SQL语句select * from mess where name like ‘%林%’是查询mess表中字段(列)name值包含有“林”的记录(记录的各个列值都要)。(8.0分)
- 下列哪些SQL语句可以查询出User表中name为张三的记录()。 A: SELECT * FROM User WHERE name = ’张三’ B: SELECT * FROM User WHERE name = ’张三’ LIMIT 0,1 C: SELECT * FROM User WHERE name LIKE ’张三’ D: SELECT * FROM User WHERE name LIKE ’%张三%’
- 若想查询student表中name为空值的记录,则正确的SQL语句是( )。 A: SELECT * FROM student WHERE name = NULL; B: SELECT * FROM student WHERE name like NULL; C: SELECT * FROM student WHERE name = 'NULL'; D: SELECT * FROM student WHERE name is NULL;
- 已知 student 表有姓名字段 name ,并且存在 name 为’sun%er’的记录。下列选项中,以匹配“ sun%er ”字段值的 SQL 语句是 A: SELECT * FROM student WHERE name LIKE ‘sun%er’; B: SELECT * FROM student WHERE name LIKE ‘%%%’; C: SELECT * FROM student WHERE name LIKE '%\%%'; D: SELECT * FROM student WHERE name =‘sun%er’;
- 若想查询student表中name为空值的记录,则正确的SQL语句是(1.0分) A: select * from student where name = null; B: select * from student where name link null; C: select * from student where name = 'null'; D: select * from student where name is null;