#1. 下面的语句是否可以执行(可以)
SELECT last_name,job_id,salary AS sal FROM employees;
#2.下面的语句是否可以执行(可以)SELECT * FROM employees;
#3.找出下面语句的错误(错用中文逗号)
SELECT employee_id,last_name, salary * 12 AS "ANNUAL SALARY" FROM employees;
#4.显示表departments的结构,并查询其中的全部数据
DESC departments;
SELECT * FROM departments;
#5.显示出表employees中的全部job_id(不能重复)
SELECT DISTINCT job_id FROM employees;
#6.显示出表employees的全部列,各个列之间用逗号连接,列头显示成out_put
SELECT IFNULL(commission_pct,0) AS 奖金率, commission_pct FROM employees;
SELECT CONCAT(first_name,',',email,',',phone_number,',',job_id,',',IFNULL(commission_pct,0)) AS out_put FROM employees;
网友评论