查询a,b表中的姓名字段,并将结果合并显示,以下语句是否实现了这项要求? select a.Name from a union select b.Name from b
举一反三
- 关于查询中列的别名, 以下()语句是不正确的(选一项) A: Select name as '姓名' from table B: Select name as姓名 from table where id =1 C: Sleect name = 姓名 from table D: Select names姓名 from table
- 下面正确表示查询goods表中type和name的SQL语句是。 A: select * from goods; B: select type name from goods; C: select type,name from goods; D: select name type from goods;
- 已知 student 表有姓名字段 name。若想查询所有姓“王”的学生,并且姓名由三个字符组成,则应使用的SQL 语句是 A: SELECT* FROM student WHERE name LIKE ‘王__’; B: SELECT* FROM student WHERE name LIKE ‘王%_’; C: SELECT* FROM student WHERE name LIKE ‘王%’; D: SELECT* FROM student WHERE name =’王__’;
- 表student中的包含两个字段,整型的id,字符串型的name。只显示表student中name列记录的SQL语句正确的是() A: select name from student B: select * from student C: select from name in student D: select name
- 已知 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’;