[转]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
相关文档:
create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',
@pagesize int output,--每页显示记录条数
@currentpage int output,--第几页
@orderid nvarchar(50),--主键排序
@sort int,--排序方式,1表示升序,0表示降序排列
......
TO_DATE格式(以时间:2007-11-02 13:45:25为例)
Year:
yy two digits 两位年 显示值:07
yyy three digits 三位年 &nbs ......
ORACLE触发LGWR日志写进程的条件
当某个事务提交时
当重做日志缓冲区中变化的记录超过1MB时
当重做日志缓冲区中所存的记录已超过缓冲区容量的1/3
在DBWR将数据库高速缓冲区中修改过的数据块写到数据文件之前
每3秒钟
......
ORACLE触发CHECKPOINT的条件
1.当发生日志组切换的时候
2.当符合LOG_CHECKPOINT_TIMEOUT,LOG_CHECKPOINT_INTERVAL,fast_start_io_target,fast_start_mttr_target参数设置的时候
3.当运行ALTER SYSTEM SWITCH LOGFILE的时候
4.当运行ALTER SYSTEM CHECKPOINT的时候
5.当运行alter tablespace XXX begin backup,e ......
ORACLE服务器一般包括以下三种安装方式
基于主机方式:在此配置下,用户可直接在安装了数据库的计算机上登录ORACLE数据库。
客户端-服务器(client-server)(两层模型)方式:数据库和客户终端分别安装在不同的计算机上,用户可通过网络从个人计算机(客户端)上访问数据库。
客户端-应用服务器-服务器(client-applicatio ......