GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 7 of 49    Print  
What is the difference between "NULL in C" and "NULL in Oracle?"

  
Total Answers and Comments: 10 Last Update: January 15, 2009     Asked by: Beena 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: sesindia
 
in c null may take the grabage values also
but in orcale it means if no data available at this column accept it ,
it is like a constrient

Above answer was rated as good by the following members:
bhatnagar_neeraj, opbehera
September 28, 2005 00:25:10   #1  
rahultripathi Member Since: September 2005   Contribution: 22    

RE: What is the difference between "NULL in C" and "NU...
The NULL in C treated as Zero or void. but in SQL NULL value is Non or blank represented it can't manuplated
 
Is this answer useful? Yes | No
October 22, 2005 04:20:16   #2  
Sampath        

RE: What is the difference between "NULL in C" and "NU...
NULL in SQL in an unknown value. It neither zero nor any valid value. It cannot be mapulated but it can only be compared
 
Is this answer useful? Yes | No
December 14, 2005 00:49:32   #3  
geostar365        

RE: What is the difference between "NULL in C" and "NU...
With reference from the Oracle book NULL is a undetermined value and will lead to infinite process (loop). NULL must be handled carefully to avoid ambiguity.To understand the difference ZERO is a numeric value and BLANK is a special character.All the best!!!
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
February 08, 2006 14:02:30   #4  
Ritesh Raj Singh Oracle DBA GKPL Mumbai        

RE: What is the difference between "NULL in C" and "NU...
Null in C is Nothing or Void which can be compared with normal operators but inoracle Null can't be compared with normal operators like ' ' or greater than or smallerthan.so be careful in using this feature of oracle because it can lead to several problems as like if u compared a password with oracle internal password and a user supplies a nullin password ur comparison may false like if INPUT_PASSWORD<>ORIGINAL_PASSWORD then raise_application_error(-20225 ' Incorrect Password ); end ifHope it may clear the DoubtsRitesh Raj SinghOracle DBA GKPL Mumbaivisit me atwww.oracledba.co.nr
 
Is this answer useful? Yes | No
September 07, 2006 05:33:05   #5  
Ashish        

RE: What is the difference between "NULL in C" and "NU...

The NULL in C means zero or void.Also its something that is uniform across the C program.In Oracle though you cant even compare two NULL values to be equal.NULL in oracle means nothing or no value.


 
Is this answer useful? Yes | No
December 19, 2006 14:15:03   #6  
Vishal Verma        

RE: What is the difference between "NULL in C" and "NU...

Nulls can be compared in Oracle

1) Select 1 from dual where null is null;

- results 1

2) select 1 from scott.emp where ename is null

- if ename is null results 1 will be output


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 15, 2008 00:30:28   #7  
ravi.8311 Member Since: June 2008   Contribution: 7    

RE: What is the difference between "NULL in C" and "NULL in Oracle?"
in oracle null is a undefined value something value is there dut we can not manipulated it. in c null is a zero or any valid data
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
November 13, 2008 05:29:42   #8  
sesindia Member Since: November 2008   Contribution: 2    

RE: What is the difference between "NULL in C" and "NULL in Oracle?"
in c null may take the grabage values also
but in orcale it means if no data available at this column accept it
it is like a constrient

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
January 02, 2009 19:20:50   #9  
symhdl Member Since: September 2008   Contribution: 1    

RE: What is the difference between "NULL in C" and "NULL in Oracle?"
This is not truely the right answer.

When you store data in oracle its terminated with a zero byte.

For example when you store HELLO its stored as

5HELLO where is the zero byte. When you dont store any data specifically or when the variable is null it contains zero byte stored in 2byte length indicator

In other words null is still a zero byte data stored in 2bytes.

Example. - .

Null in C is not garbage value that is a misconception. Null in C also is a zero byte character - null character ' '

If the variable is not initialized the location may contain some values which could be considered as garbage as its unpredictable.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
January 12, 2009 08:55:01   #10  
zelani Member Since: January 2009   Contribution: 2    

RE: What is the difference between "NULL in C" and "NULL in Oracle?"
null in c is some garbage value which cannot be predicted . If you are not intialising any value to the variable then null value is present in auto variables.
null in oracle is used in sql queries for getting values whose values are null such as manger is null or comm is null.the null is an operator in oracle . If you want to compare values against NULL as conditions you should use the "IS NULL" or "IS NOT NULL" operator. Do not use " " or "<>" against NULL.

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape