语法:select * |{[DISTINCT] column | expression [alias],...} FROM table [WHERE condition(s)];
select employee_id,last_name,job_id,department_id from employees where department_id=90;
=
>
>=
<
<=
<>
BETWEEN...AND...
IN(set)
like
is null
select last_name,salary from employees where salary <=3000;
select last_name,salary from employees where salary salary BETWEEN 2000 AND 3500;
select employee_id,last_name,salary,manager_id from employees where manager_id IN (100,102,201);
select first_name from employees where first_name like ‘_S%‘;
%匹配符 _匹配符
逻辑运算
and or not
排序
ORDER BY 默认升序,只影响前当前字段.
ASC 升序
DESC 降序
本文出自 “雷驰科技工作室” 博客,谢绝转载!
原文地址:http://leiciit.blog.51cto.com/3726387/1698703