ORACLE函数大全
LONEFOX题记:
最近搞ORACLE, 转过来供参考。
=================================
1、SQL 语句基础
下面给出SQL语句的基本介绍。
1.1、SQL语句所用符号
操作符
用途
例子
+ -
表示正数或负数,正数可省去 +
-1234.56
+
将两个数或表达式进行相加
A=c+b
-
将两个数或表达式进行相减
34-12
*
将两个数或表达式进行相乘
12*34
/
除以一个数或表达式
18*11
NULL
空值判断
Where name is null;
||
字符串连接
‘101-’||tel_num
=
等于测试
Select * from emp where name=’赵元杰’;
!= 或<>或^=
不等于测试
Select * from emp where name !=’赵元杰’;
<
小于测试
Select * from emp where sal < 5000;
>
大于测试
Select * from emp where sal > 5000;
<=
小于等于测试
Select * from emp where sal <= 5000;
>=
大于等于测试
Select * from emp where sal >= 5000;
Not in
测试某值是否在一个指定的结果集中
Select name,addr from expert where local not in(‘北京’,’上海’);
ANY
将一个值与一组值进行比较,返回满足条件的结果。必须跟!=,<,>,<=,>=
select ename,sal from emp where sal<= any(select sal from emp where deptno=10)
SOME
同ANY,必须跟!=,<,>,<=,>=
ALL
将一个值与一组值比较,返回满足条件的所有列值。必须跟!=,<,>,<=,>=
Select name,sal from emp w here sal<= all
( 500,800,1200);
Not between
A and B
判断某个值是否界于两者之间。
Select name,sal from emp Where
sal between 500 and 1200;
[not]exists
判断某个列是否存在于一组值中。
select dname,deptno from dept where exists
(select * from emp wher
相关文档:
好没有碰Solaris了,手有些生了,看来真要装个solaris,平时多玩玩。
在solaris上装Oracle 10g先。
1. 检查安装依赖包
官方要求的包
SUNWarc
SUNWbtool
SUNWhea
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
SUNWi1of
SUNWi1cs
SUNWi15cs
SUNWxwfnt
执行命令
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SU ......
这篇文章阐述了如何管理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审计功能
审计是对选定的用户动作的监控和记录,通常用于:
u 审查可疑的活动。例如:数据被非授权用户所删除,此时安全管理员可决定对该 数据库的所有连接进行审计,以及对数据库的所有表的成功地或不成功地删除进行审计。
u &n ......
1、连接Oracle数据库
启动SQL*Plus,要求输入User Name、Password、Host String这三个参数,例如我在安装的时候默认创建的数据库为orcl,也就是SID,密码也为orcl,对应上面的三个参数如下所示:
User Name:orcl
Password:orcl
Host String:orcl as sysdba
就可以登录成功。
或者也可以使用默认的scott来登录:
......
PROCEDURE user_Login (
i_AuthID IN user_UserPass.UserID%TYPE, --用户代码
i_FunctionCode IN &n ......