![]() |
IT-Interview.com:Open Database for IT Professionals to share interview questions, answers and knowledge. |
![]() |
IT-Interview.com:Open Database for IT Professionals to share interview questions, answers and knowledge. |
Best Answer ! ! !
varchar means fixed length character data(size) ie., min size-1 and max-2000
where as varchar2 means variable length character data ie., min-1 to max-4000
The difference between Varchar and Varchar2 is both are variable length but only 2000 bytes of character of data can be store in varchar where as 4000 bytes of character of data can be store in varchar2.
neptune answered on£ºSep 28, 2009 0 comments 
Emp_name varchar(10) - if you enter value less than 10 then remaining space can not be deleted. it used total 10 spaces.
Emp_name varchar2(10) - if you enter value less than 10 then remaining space is automatically deleted
xjin answered on£ºSep 29, 2009 0 comments
VARCHAR : when u r using this data type what ever size u r giving that much of memory is allocated to that variable. suppose u r giving varcahr(20) then u enter only 15 cahracters of that variable then also it is giving memory of 20 cahracters.VARCHAR2: when u r using this data type the memory allocation is different. suppose u r givng varchar2(20) then it is allocated the memory for 20 cahracter. but the varibale is giving 15 character then the memory willbe allocated only that 15 characters not for 20 cahracters.this is the main difference between varcahr and varchar2
roze answered on£ºOct 1, 2009 1 comments
VARCHAR is generally used for sql where as VARCHAR2 is used for the Mysql.literally both mean the same i.e they accept both numericals and variables.
georgetkl answered on£ºOct 2, 2009 0 comments
I'm sorry but these answers are all off the mark. VARCHAR2 is Oracle and VARCHAR is ansi standard. Regardless how they behave or how big it can be it's simply a vendor vs standard issue.
resha answered on£ºOct 4, 2009 0 comments 
Hi
i am kumar.can you give the clear differnece between varchar and varchar2 with example.
Thanks®ards
kumar
darkwinter answered on£ºOct 5, 2009 0 comments 
Sorry guys
There is a quotation from Christopher Allen Oracle Database 10g PL/SQL 101 :
There is a datatype named VARCHAR as well. In early versions of Oracle the maximum length of a VARCAR column was 1 000 characters later expanded to 4 000 characters for the datatype VARCHAR2. In current version of Oracle both datatypes enjoy 4 000-character limit. However Oracle Corporation says they may change the behavior of a VARCHAR column in future and we have no way of knowing how the changed VARCHAR will behave so
pingping answered on£ºOct 7, 2009 1 comments 
There is no difference between varchar & varchar2 regarding memory allocation & release. both r variable in length and occupies memory at runtime.
Ashok Verma............
tammytan89 answered on£ºOct 9, 2009 0 comments
for god sake dont give the wrong replies here !!!!!!!!!!!!!!!!!Varchar2 is variable width character data type so if you define column with width 20 and insert only one character to tis column only one character will be stored in database. Char is not variable width so when you define column with width 20 and insert one character to this column it will be right padded with 19 spaces to desired length so you will store 20 characters in the dattabase .Varchar data type from Oracle 9i is automaticlly promoted to varchar2
damien57 answered on£ºOct 11, 2009 1 comments