Oracle-SQL语法

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/caoxuecheng001/article/details/85136035

1、不等于

三种形式:<>   !=   not

select * from emp where not job='CLERK';

 select * from emp where job!='CLERK';

 select * from emp where job<>'CLERK';

2、between  and

select * from emp where sal between 1500 and 3000;//包含1500和3000

3、not in 的问题

4、模糊查询的问题

5、排序问题

如果是日期,则1987比1981大,按数字大小排序,而不是年份的早晚。

对于排序操作,一般只在需要的地方 上使用,而且一定要记住,order by 子句是写在所有的SQL语句的最后的部分

6、日期问题

三个基本计算:

 

猜你喜欢

转载自blog.csdn.net/caoxuecheng001/article/details/85136035
今日推荐