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

Oracle NULL 空字符串。。。。。。

含义解释:
问:什么是NULL?
答:在我们不知道具体有什么数据的时候,也即未知,可以用NULL,我们称它为空,ORACLE中,含有空值的表列长度为零。
ORACLE允许任何一种数据类型的字段为空,除了以下两种情况:
1、主键字段(primary key),
2、定义时已经加了NOT NULL限制条件的字段
说明:
1、等价于没有任何值、是未知数。
2、NULL与0、空字符串、空格都不同。
3、对空值做加、减、乘、除等运算操作,结果仍为空。
4、NULL的处理使用NVL函数。
5、比较时使用关键字用“is null”和“is not null”。
6、空值不能被索引,所以查询时有些符合条件的数据可能查不出来,count(*)中,用nvl(列名,0)处理后再查。
7、排序时比其他数据都大(索引默认是降序排列,小→大),所以NULL值总是排在最后。
使用方法:
SQL> select 1 from dual where null=null;
没有查到记录
SQL> select 1 from dual where null='''';
没有查到记录
SQL> select 1 from dual where ''''='''';
没有查到记录
SQL> select 1 from dual where null is null;
1
---------
1
SQL> select 1 from dual where nvl(null,0)=nvl(null,0);
1
---------
1
对空值做加、减、乘、除等运算操作,结果仍为空。
SQL> select 1+null from dual;
SQL> select 1-null from dual;
SQL> select 1*null from dual;
SQL> select 1/null from dual;
查询到一个记录.
注:这个记录就是SQL语句中的那个null
设置某些列为空值
update table1 set 列1=NULL where 列1 is not null;
现有一个商品销售表sale,表结构为:
month    char(6)      --月份
sell    number(10,2)   --月销售金额
create table sale (month char(6),sell number);
insert into sale values(''200001'',1000);
insert into sale values(''200002'',1100);
insert into sale values(''200003'',1200);
insert into sale values(''200004'',1300);
insert into sale values(''200005'',1400);
insert into sale values(''200006'',1500);
insert into sale values(''200007'',1600);
insert into sale values(''200101'',1100);
insert into sale values(''200202'',1200);
insert into sale values(''200301'',1300);
insert into sale values(''200008


相关文档:

Oracle数据库中的锁机制研究

数据库是一个多用户使用的共享资源。当多个用户并发地存取数据时,在数据库中就会产生多个事务同时存取同一数据的情况。若对并发操作不加控制就可能会读取和存储不正确的数据,破坏数据库的一致性。
加锁是实现数据库并发控制的一个非常重要的技术。当事务在对某个数据对象进行操作前,先向系统发出请求,对其加锁。加锁后 ......

Oracle 常用网址 积累中。。

官方文档:http://tahiti.oracle.com/
metalink:http://metalink.oracle.com
itpub:www.itpub.com
TOM:asktom.oracle.com
oracle forum:http://forums.oracle.com/forums/main.jspa?categoryID=84
OTN:http://www.oracle.com/technology/index.html
www.oracle.com.cn
www.eygle.com
 
Oracle ERP
www.erp10 ......

最近在做Oracle临时表加载 转载一个以便查询

转载
DML statements on temporary tables do not generate redo logs for the data changes. However, undo logs for the data 
and redo logs for the undo logs are generated. Data from the temporary table is automatically 
dropped in the case of session termination, either when the user logs o ......

C#环境下往oracle中的blob字段插入文件

添加引用            
using System.Data.OracleClient;
主要用到了两个类
System.Data.OracleClient.OracleConnection 表示一个到数据库的连接。此类无法继承。
System.Data.OracleClient.OracleCommand   表示针对数据库执行的 SQL 语句或存 ......

Oracle to_date的使用方法

Oracle to_date的使用方法
日期格式参数 含义说明
D 一周中的星期几
DAY 天的名字,使用空格填充到9个字符
DD 月中的第几天  
DDD 年中的第几天
DY 天的简写名
IW ISO标准的年中的第几周
IYYY ISO标准的四位年份
YYYY 四位年份
YYY,YY,Y 年份的最后三位,两位,一位
HH 小时,按12小时计 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号