What is the difference between Varchar and Varchar2?

Showing Answers 1 - 4 of 4 Answers

sabithagopi

  • Jan 23rd, 2007
 

varchar2:
              used for variable length  character string ..stores the value on the disk
varchar:
              exactly same as varchar2 the difference is that it doesnt store the value since it hav to be retrieved for further use
char:
             char is used for fixed length character string..

  Was this answer useful?  Yes

Hiral

  • Feb 9th, 2007
 

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

  Was this answer useful?  Yes

Deepak Bhandari

  • Mar 30th, 2007
 

varchar and varchar2: both are datatype for storing character or string type, but there are little bit difference in both, let us with following exemple

if we declare a variable name as varchar(100) then at the time of declaring it will make 100 seprate space for that variable in memory and the time of insertion if we are giving only 50 character name the balance 50 character space will be lost and it is unusable for any other variable but in varchar2 it will take only 50 character and balance 50 character can be used by any other variable.

  Was this answer useful?  Yes

neel_desai

  • Oct 11th, 2008
 

There is no VARCHAR2 in SQL server.

SQL Server VARCHAR = oracle VARCHAR2

In SQL Server, maximum size of VARCHAR is 8000. So VARCHAR(MAX) is same as VARCHAR(8000). Also if we write VARCHAR(10000), will give error:

The size (10000) given to the type 'varchar' exceeds the maximum allowed for any data type (8000).

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions