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

oracle的一些知识小结

Sql中两个“-”表示注释的开始。
拼接运算符:”||”,注意:只有在所有的运算符为null时,拼接的结果是null。
比较运算符用于比较两个值或表达式,给出一个布尔型的结果 true,false,null.
比较运算符:
=
!=  <>   ^=
[not]in 包含
Any some 将一个值与列表中的每个值或者与查询结果中的每一个值进行比较,假如查询没有返回结果,则结果为false。前面必须有=,!=,>=,<等符号。
Select last_name from emp where salary<=any(select salary from emp where deptno=10);
 
All 将一个值与列表中的每个值或者与查询结果中的每个值进行比较,假如查询没有返回结果,则结果为true。前面必须有=,!=,<,>等符号。
Select last_name from emp where salary<=all(500,1000.9000);
 
[not] between a and b
Select last_name from emp where salary between 4000 and 10000;
 
[not] exists 假如一个子查询至少返回一行时,结果为true
Select last_name from emp a where not exists(select ‘x’ dummu from emp b where b.deptno=10 and a.last_name=b.last_name);
 
A [not] like b [escape ‘char’] 用于模式匹配;假如模式a与模式b匹配,则结果为true。模式匹配符%用于匹配0个或任意多个字符。_用于匹配一个字符。关键字escape用于提示oracle解释%和_字符,不要将他们作为特殊字符串处理。
Select last_name from emp where last_name not like ‘Th%’;
Select last_name from emp where last_name like ‘_tt%’;
Select synonym_name from dba_synonums wnere synonym_name like ‘all\_u%’escape’\’;
 
Is [not] null 只有一个运算符,用来测试其值是否为空。
Select last_name from emp where salary is not null;
 
逻辑运算符:
Not 将结果取反。假如运算数是null,则返回null,当运算数是false时,结果返回true,否则返回false。
Select * from emp where not (salary<100)
And 假如所有的运算数为true,则结果为true;如果其中一个为false,则结果为false。否则结果是null。
Or假如所有的运算数为false,则结果为false;如果其中一个为true,则结果为true。否则结果是null。
 
集合运算符:
Union 返回所有查询结果中的行,不包括重复的值


相关文档:

oracle 表空间操作

oracle表空间操作详解
  1
  2
  3作者:   来源:    更新日期:2006-01-04 
  5
  6 
  7建立表空间
  8
  9CREATE TABLESPACE data01
 10DATAFILE '/ora ......

Oracle Form開發(4)

上節學習開第一個Form,這個節在添加一個彈出下拉框
第一步:添加記錄組
1.1  選中Record Groups
1.2  單擊Create
1.3  輸入查詢SQL
1.4  單擊OK
1.5  修改 ......

获取oracle client登录IP的方法

 一、UTL_INADDR包获取ip地址
今天有朋友在MSN上问我如何获得已经连接用户的IP地址。
我们知道,通过SYS_CONTEXT函数可以获得这部分信息,当前用户的ip等信息可以通过如下命令轻易获取:
SQL> select sys_context('userenv','host') from dual;
SYS_CONTEXT('USERENV','HOST')
------------------------------ ......

Oracle日常维护点滴

Oracle维日常护点滴
    虽然Oracle维护不是我的职责,但平时还是难免要跟它打交道,因此对于Oracle的日常维护略知一二还是很有好处的。
 1. 登录:
  (1)采用系统管理员用户登录:
#su - oracle
$ sqlplus / as sysdba
  (2)采用一般用户登录,假设用户名为oracle,密码为passwor ......

oracle update from 问题!

  update t_tmprpt_firstreplycosttime t
set (t.firstreplytime,
t.dealstaff,
t.firstreplyfailcontent)
= (select a.suggesttime,
a.suggester,
substr(a.remark,instr(a.remark,'】',1)+2)
from t_wf_suggesthis a
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号