在员工管理系统中,查询表employee表中所有员工的姓名,字段:id(int),firstname(varchar),lastname(varchar),以下sql语句正确的是()。
A: Select firstname +’.’+ lastname as ‘name’ from employee
B: Select firstname +’.’+ lastname from employee
C: Select ‘name’= firstname +’.’+ lastname from employee
D: Select firstname,lastname from employee
A: Select firstname +’.’+ lastname as ‘name’ from employee
B: Select firstname +’.’+ lastname from employee
C: Select ‘name’= firstname +’.’+ lastname from employee
D: Select firstname,lastname from employee
举一反三
- employee表中lastname列保存顾客姓,firstname列保存顾客的名,现在,需要查询顾客的姓名的组合,例如,lastname列中的”张“,同一行firstname列中的”国华“,查询结果应该返回”张国华“,则正确的查询语句应该是( ) A: select lastname,firstname from employee B: select * from employee order by lastname,firstname C: select lastname+firstname from employee D: select lastname and firstname from employee
- 现有表Employee,字段:id(int)、firstname(varchar)、lastname(varchar);以下sql语句错误的是()
- 通过 SQL,在表 Actor 中选择 FirstName 等于 Jim 而 LastName 等于 Carter 的所有记录的表述正确的是( )。? SELECT * FROM Actor WHERE FirstName LIKE 'Jim' AND LastName LIKE 'Carter'|SELECT * FROM Actor WHERE FirstName='Jim' OR LastName='Carter'|SELECT FirstName='Jim', LastName='Carter' FROM Actor|SELECT * FROM Actor WHERE FirstName='Jim' AND LastName='Carter'
- 通过 SQL,在表 Actor 中选择 FirstName 等于 Jim 而 LastName 等于 Carter 的所有记录的表述正确的是( )。 A: SELECT * FROM Actor WHERE FirstName LIKE 'Jim' AND LastName LIKE 'Carter' B: SELECT FirstName='Jim', LastName='Carter' FROM Actor C: SELECT * FROM Actor WHERE FirstName='Jim' AND LastName='Carter' D: SELECT * FROM Actor WHERE FirstName='Jim' OR LastName='Carter'
- Employee 表中LastName列保存顾客的姓,FirstName列保存顾客的名。现在,需要查询顾客姓名的组合,例如,LastName列中的“张”,同一行FirstName列中的“国华”,查询结果应该返回“张国华”,则正确的查询语句应该是()。 A: SELECT LastName, FirstName FROM Employee B: SELECT SName, SYSTEM_USER AS 查询用户 FROM Students C: SELECT SName, 查询用户 FROM Students D: SELECT SName, SYSTEM_USER=查询用户 FROM Students