首页 > 编程语言 > 详细

学习笔记之--047.第二章 限制和排序数据

时间:2015-09-28 19:24:41      阅读:236      评论:0      收藏:0      [点我收藏+]

语法: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 降序


本文出自 “雷驰科技工作室” 博客,谢绝转载!

学习笔记之--047.第二章 限制和排序数据

原文:http://leiciit.blog.51cto.com/3726387/1698703

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!