Null value operation:
NULL means null.
First, the situation:
1: Any field in the table can be a null value by default.
2:NOT NULL means non-null, a field with a constraint set to a non-null constraint, must have a valid value, and cannot be empty.
3: Insert data when reg:insert into EMP (ENAME,EMPNO) VALUES (2001, ' Zhang San '); In this record, fields that are not assigned are null values.
Reg:insert into EMP (ename,empno) values (2001,null); In this record, the field empno is a null value
4: When modifying data:
(1) The null value is the condition
update emp Set ename= ' Zhang San ' where comm is null;
(2) When set to NULL,
Update EMP Set name = NULL;
5: null equals infinity 1+null equals null null is not equal to NULL when the empty value participates in the calculation.
Two, null operation function:
1) NVL (P1,P2) indicates that if the value of P1 This field is null, it is used P2, otherwise p1 is used.
2) Nvl2 (P1,P2,P3) indicates that if P1 is not null, p2 is used and P3 is used if null.
Tomorrow will give you update DQL language, that is, the use of SELECT, if you have help, then a lot of support I next Ah, like a little attention to it!!!
Oracle database NULL operation