SQL tutorial | Interview questions | Oracle
Would you like to react to this message? Create an account in a few clicks or log in to continue.

What Is NULL?

Go down

What Is NULL? Empty What Is NULL?

Post by Micheal Sat Jan 16, 2010 9:21 pm

NULL is a special value representing "no value" in all data types. NULL can be used on in
operations like other values. But most opertations has special rules when NULL is involved. The
tutorial exercise below shows you some examples:
SET NULL 'NULL'; -- Make sure NULL is displayed
SELECT NULL FROM DUAL;
N
-
N
U
L
L
SELECT NULL + NULL FROM DUAL;
NULL+NULL
----------
NULL
SELECT NULL + 7 FROM DUAL;
NULL+7
----------
NULL
SELECT NULL * 7 FROM DUAL;
NULL*7
----------
NULL
SELECT NULL || 'A' FROM DUAL;
N
-
A
SELECT NULL + SYSDATE FROM DUAL;
NULL+SYSD

Micheal
Admin

Posts : 243
Join date : 2010-01-10

http://sql-tutorial.co.cc

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum