Exforsys
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Value of NULL

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 equal ...

  1. #1
    ashlee is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    108

    Value of NULL

    I want to know what is the value of NULL in oracle.Is this equal to zero, or is it equal to spaces or any junk value.


  2. #2
    sarunraj is offline Junior Member Array
    Join Date
    Nov 2006
    Location
    Bangalore, India
    Answers
    16

    Thumbs up Null

    NULL is not equal to ZERO.
    It just means that there is no value at all in that memory area / column / field.

    Hope it helps,
    Arun


  3. #3
    nnirmalkumar is offline Junior Member Array
    Join Date
    Dec 2006
    Answers
    6
    hi,

    Its just a empty thing............ thts all


  4. #4
    ashlee is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    108
    I could understand that it is nothing but what is the value that gets stored in memory area of the column made as NULL. Will it be junk?


  5. #5
    madug is offline Junior Member Array
    Join Date
    Jan 2007
    Answers
    2
    hai
    Null is not a Zero or any number ,it is a blank space


  6. #6
    caradoc is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    122
    Friends very nice discussion going around. Since NULL is blank as specified here in this discussion is it possible to compare two NULL. Will it give error?


  7. #7
    nagivijay is offline Junior Member Array
    Join Date
    Dec 2006
    Answers
    4

    the value of null

    The value of null is unkown..it means its not been initiated. So null never be considered as zero or anyvalue.In a table balnk space and zero both has a value. so null is considered as an unkown.


  8. #8
    sarunraj is offline Junior Member Array
    Join Date
    Nov 2006
    Location
    Bangalore, India
    Answers
    16

    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


  9. #9
    prem.ranjan is offline Junior Member Array
    Join Date
    Apr 2007
    Answers
    1

    anser of null

    Quote Originally Posted by ashlee View Post
    I want to know what is the value of NULL in oracle.Is this equal to zero, or is it equal to spaces or any junk value.
    NULL is nothing but a character data type with zero lenth string.


  10. #10
    psiva_exforsys is offline Junior Member Array
    Join Date
    Jun 2007
    Answers
    8
    In oracle NULL is not equal to any one (NULL or any number). In oracle NULL value stored in empty in database table. but internally it has some alpha numeric value.

    Regards,
    Siva.P
    Bangalore


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...