mysql 基础查询
查询常量
select 10;
select ‘alex’;
查询表达式
select 3 * 5 ;
显示函数
select VERSION();
select LENGTH(‘alex bob’);
查询表中的字段
select * from employees;
select email '邮箱’from employees;
查询表中的多个字段
select * from employees;
select job_id,email from employees;
显示表中的所有的字段
select * from employees;
起别名
select job_id ‘工号’,email '邮箱 ’ from employees;
如何去重
select * from departments;
select DISTINCT department_id from departments;