This is a discussion on Value of NULL within the Oracle Database forums, part of the Database category; I want to know what is the value of NULL in oracle.Is this equal to zero, or is it ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Value of Null
Hi,
NULL in Oracle means that there is no value in that memory area. It is not equal to 0. see the folliwing SQL script.. SQL> select emp_id, emp_name, mobile from emp; In this script, if the employee doesnt have any mobile number entered into the database, this query will return a NULL value (NO value) for the column Mobile. Example output: EMP_ID EMP_NAME MOBILE ------- ---------- -------- 101 JOHN In this case the MOBILE number of JOHN is not entered, so no value is retrieved for that field. you can rewrite the SQL script as SQL> select emp_id, emp_name, NVL(mobile, 'Not Entered'); In this Case the output will be EMP_ID EMP_NAME MOBILE ------- ---------- -------- 101 JOHN Not Entered NVL( ) function checks whether the value is null or not. If the value is null, then it will return string mentioned. Hope this clarifies.... Arun |
|
|||
|
anser of null
NULL is nothing but a character data type with zero lenth string.
|
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-15-2004 06:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 06-01-2004 06:01 AM |
| comp.lang.c Answers to Frequently Asked Questions (FAQ List) | Steve Summit | Tech FAQ | 0 | 06-01-2004 06:00 AM |
| comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ) | Steve Summit | Tech FAQ | 0 | 05-15-2004 06:00 AM |
| Apple II Csa2 FAQs: Telecom Hardware & Transfers, Part 20/25 | rubywand@swbell.net | Tech FAQ | 0 | 04-04-2004 07:29 AM |