GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 6 of 49    Print  
In Oracle varchar2 takes dynamic space for storage then why char is still in oracle?

  
Total Answers and Comments: 16 Last Update: March 17, 2009     Asked by: Beena 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: rahultripathi
 

The mejor defference between varchar2 and char is fixed length and variable length . varchar2 have varible length mean if we declare as 20 space and its use only 5 space the memory asigne only 5 . but in char takes daclare  space  while use any number space  less than declare

any problem / suggetion contact rahultripathi@myway.com  



Above answer was rated as good by the following members:
lotus123, ndimancd, elbanna2008, sesindia, himanshu_sapra
  Sorting Options  
  Page 1 of 2   « First    1    2    >     Last »  
September 28, 2005 00:35:12   #1  
rahultripathi Member Since: September 2005   Contribution: 22    

RE: In Oracle varchar2 takes dynamic space for storage...

The mejor defference between varchar2 and char is fixed length and variable length . varchar2 have varible length mean if we declare as 20 space and its use only 5 space the memory asigne only 5 . but in char takes daclare space while use any number space less than declare

any problem / suggetion contact rahultripathi@myway.com


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
March 31, 2006 17:55:49   #2  
geetha24 Member Since: March 2006   Contribution: 27    

RE: In Oracle varchar2 takes dynamic space for storage...
but the question here is why char is still used in oracle
 
Is this answer useful? Yes | No
April 20, 2006 10:09:07   #3  
ramiya        

RE: In Oracle varchar2 takes dynamic space for storage...
hi plz reply me why we use char still we use varchar2
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
May 18, 2006 01:36:43   #4  
ranjana tripathi        

RE: In Oracle varchar2 takes dynamic space for storage...
char is fixed we know and therefore this is also sure that whenever we will use that it will fix the memory space accordingly still we use it because while working sometimes we are sure that one of the column value should not be tampered or u may say shoulod not be allowed to be tampered by giving them more space so we fix that particular column as char.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 1Overall Rating: -N/A-    
May 18, 2006 10:58:39   #5  
Vikram Muddya        

RE: In Oracle varchar2 takes dynamic space for storage...

char is used if we know that the length wont exceed the specified range while varchar is used for varying range.

If we want any string not exceeding 6 we use char(6) because we can put a constraint if someone is trying to enter more or less than 6.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 25, 2006 07:06:24   #6  
Amit        

RE: In Oracle varchar2 takes dynamic space for storage...

When we export external data then we used fixed lenght of record this is possible by char or second reson is whenever we use varchar it stores its width which occupies memory. so here two reson is sufficient for char.

Third reason is performance .


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
June 06, 2006 08:59:51   #7  
umesh        

RE: In Oracle varchar2 takes dynamic space for storage...
char is of fied length search operation becomes faster since oracle engine has to look for predetermined length of characters.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
August 02, 2007 06:02:03   #8  
anil kumar        

RE: In Oracle varchar2 takes dynamic space for storage...
The char data type is used in oracle for giving small and single values like T (or) F..

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
October 08, 2007 02:47:34   #9  
sshravanam Member Since: April 2007   Contribution: 5    

RE: In Oracle varchar2 takes dynamic space for storage...

In VARCHAR2 we can make use of numbers along with characteres......
But in CHAR we can have only characters.


 
Is this answer useful? Yes | No
October 16, 2007 04:33:49   #10  
NIRANJAN        

RE: In Oracle varchar2 takes dynamic space for storage...
We can use numbers and characters in char function
Please try it.ok.

with regaurds
niranjan

 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
  Page 1 of 2   « First    1    2    >     Last »  


 
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