易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle 常用函数

1. select * from emp;
2. select empno, ename, job from emp;
3. select empno 编号, ename 姓名, job 工作 from emp;
4. select job from emp;
5. select distinct job from emp;
6. select distinct empno, job from emp;
说明:因为雇员编号不重复, 所以此时证明所有的列没有重复,所以不能消除掉重复的列.
7. 查询出雇员的编号, 姓名, 工作, 但是显示的格式:编号是: 7369 的雇员, 姓名是: smith, 工作是: clear
select '编号是: ' || empno || '的雇员, 姓名是: ' || ename || ', 工作是: ' || job from emp;
8. 求出每个雇员的姓名及年薪
select ename, sal * 12 income from emp;
9. 求出工资大于 1500 的所有雇员信息
select * from emp where sal > 1500;
10. 查询每月可以得到奖金的雇员信息
select * from emp where comm is not null;
11. 查询没有奖金的雇员信息
select * from emp where comm is null;
12. 查询出基本工资大于 1500 同时可以领取奖金的雇员信息
select * from emp where sal > 1500 and comm is not null;
13. 查询出基本工资大于 1500 或者可以领取奖金的雇员信息
select * from emp where sal > 1500 or comm is not null;
14. 查询出基本工资不大于 1500 或者不可以领取奖金的雇员信息
select * from emp where not(sal > 1500 and comm is not null);
15. 查询基本工资大于 1500, 但是小于 3000 的全部雇员信息
select * from emp where sal > 1500 and sal < 3000;
16. 查询基本工资大于等于 1500, 但是小于等于 3000 的全部雇员信息
select * from emp where sal >= 1500 and sal <= 3000;
select * from emp where sal between 1500 and 3000;
17. 查询出在 1981 年雇佣的全部雇员信息(1981 年 1 月 1 日 到 1981 年 12 月 31 日之间的雇佣的雇员)
select * from emp where hiredate between '1-1月-81' and '31-12月-81';
18. 要求查询出姓名是 smith 的雇员信息
select * from emp where ename = 'SMITH';
19. 要求查询出雇员是 7369, 7499, 7521 的雇员的具体信息
select * from emp where empno = 7369 or empno = 7499 or empno = 7521;
select * from emp where empno in(7369, 7499, 7521);
20. 要求查询出雇员不是 7369, 7499, 7521 的雇员的具体信息
select * from emp where empno not in(7369, 7499, 7521);


相关文档:

Oracle启动过程详解 介绍及命令,还有关闭

Oracle启动过程介绍及命令,还有关闭。
写在前面:启动数据库前,请先启动监程序。
lsnrctl start
启动的三个步骤,依次为1.创建并启动实例、2.装载数据库、3.打开数据库。
可以通过命令startup来实现。
startup 命令格式
startup [ nomount | mount | open | force ] [ restrict ] [ pfile=filename ];
方法1 -- st ......

这篇文章阐述了如何管理oracle ERP的interface表


这篇文章阐述了如何管理oracle ERP的interface表
这篇文章阐述了如何管理oracle ERP的interface表
http://blog.oraclecontractors.com/?p=212
There are a number of tables used by Oracle Applications that should have no rows in them when all is running well, and if any, only a few rows that are in error. ......

Oracle时间精确到时、分、秒处理方法

一般数据库中时间的格式为DATE类型,而我们从页面中获取的时间往往为String类型,这个就需要类型的转换。一般我们会通过调用 Java.text.SimpleDateFormat JAVA类来对其进行转换。这个JAVA类中我们经常用到的方法有两个,一个是format(将时间格式的数据转换成String类型),另一个就是 parse(将String类型转换成DATE类型)。我 ......

(转)oracle中的rownum


在Oracle中,要按特定条件查询前N条记录,用个rownum就搞定了。
select * from emp where rownum <= 5
而且书上也告诫,不能对rownum用">",这也就意味着,如果你想用
select * from emp where rownum > 5
则是失败的。要知道为什么会失败,则需要了解rownum背后的机制:
1 Oracle executes your quer ......

Solaris10 安装Oracle 10g

http://inthirties.com:90/thread-1233-1-1.html
好没有碰Solaris了,手有些生了,看来真要装个solaris,平时多玩玩。
在solaris上装Oracle 10g先。
1. 检查安装依赖包
官方要求的包
SUNWarc
SUNWbtool
SUNWhea
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
SUNWi1of
SUNWi1cs
SUNWi15cs
SUNWxwfnt
执行命令
# p ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号