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

[转]Oracle,sql server的空值(null)判断


sql server
替换null:isnull(arg,value)
如:select isnull(price,0.0) from orders                             ,如果price为null的话,用0.0替换
与null比较:  is not null,is null
 如  select * from orders where price is null                      ,price等于null
如: select * from orders where price is not null                  ,  price不等于null
Oracle
替换null: nvl(arg,value)
如: select  nvl(price,0.0) form orders
与null比较:  is not null,is null
 如  select * from orders where price is null                      ,price等于null
如: select * from orders where price is not null                  ,  price不等于null


相关文档:

Oracle中TO_DATE格式

TO_DATE格式(以时间:2007-11-02   13:45:25为例)
Year:     
yy two digits 两位年            显示值:07
yyy three digits 三位年          &nbs ......

查询oracle当前连接数

   我们假设是数据库管理员,为了数据库的安全,我们需要知道当前有多少连接数,最大支持多少连接数,可以用以下语句查询
      select username,count(username),machine,status from v$session         
    &n ......

ORACLE锁信息

查看被锁的表
select   p.spid,a.serial#,
c.object_name,b.session_id,b.oracle_username,b.os_user_name   from  
v$process   p,v$session   a,   v$locked_object   b,all_objects   c  
where   p.addr=a.p ......

Oracle job 管理

SVRMGR> select * from dba_jobs;
初始化相关参数job_queue_processes
alter system set job_queue_processes=39 scope=spfile;//最大值不能超过1000  ;job_queue_interval = 10  //调度作业刷新频率秒为单位
DBA_JOBS describes all jobs in the database.
USER_JOBS describes all jobs owned by the c ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号