what is the difference between VARCHAR and VARCHAR2?

Answers were Sorted based on User's Feedback



what is the difference between VARCHAR and VARCHAR2?..

Answer / shishal

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.
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…”


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 .

Is This Answer Correct ?    27 Yes 12 No

what is the difference between VARCHAR and VARCHAR2?..

Answer / m arunachalam

These is a simple difference only...

Varchar- It can fixed size to the memory.
Ex:varchar(50)->Memory can take 50 characters to
allocate...
If You given string 'arunachalam' it contains 11 characters
and assign to memory. Remaining 39 character also assign to
empty character in memory....

Varchar2-It can fixed size by your given data length..
Ex:Varchar2(50)->Memory can take 50 characters to allocate...
If You given string 'arunachalam' it contains 11 characters
and assign to memory. Remaining 39 character here not assign
to memory and memory size should be reduced from remaining
size....

Is This Answer Correct ?    15 Yes 5 No

what is the difference between VARCHAR and VARCHAR2?..

Answer / vetrivel

VARCHAR:
Stores strings of variable length.
The length parameter specifies the maximum length of the strings
It stores up to 2000 bytes of characters
It will occupy space for NULL values
The total length for strings is defined when database was created.
VARCHAR2:
Stores strings of variable length.
The length parameter specifies the maximum length of the strings
It stores up to 4000 bytes of characters
It will not occupy space for NULL values
The total length of strings is defined when strings are given.

Is This Answer Correct ?    4 Yes 2 No

what is the difference between VARCHAR and VARCHAR2?..

Answer / atul

i am not satisfied to all answers because if we say that
vsize() both are give same answer pls clear my doubt .

thanks to above suggestion/ans.

Is This Answer Correct ?    2 Yes 3 No

what is the difference between VARCHAR and VARCHAR2?..

Answer / deepak gupta

Thanks Shishal

Is This Answer Correct ?    7 Yes 10 No

Post New Answer

More Engineering AllOther Interview Questions

hi, i m ganesh.. i have cleared LAKSHMI VILAS BANK FOR clerical post... any body who have already received interview call letter pl mail me to my mail id ganesh_280574@rediffmail.com my mobile no is 9842648112

6 Answers   Lakshmi Vilas Bank,


What is the reason of hunting of variable turbine geometry?

2 Answers  


Write a function to print all the combinations of a string both uppercase and lowercase without altering the position of each letter.

0 Answers  


What type of questions are asked in interview?

0 Answers  


what is the use of typedef in c language?

0 Answers  






The Barnes Foundation in Philadelphia has one of the most extra-ordinary and idiosyncratic collections in French impressionist art. Dr. Barnes who put together this collection has insisted that the paintings be hung in a particular manner specified by him at a museum designed by the French architect Paul Philippe Cret who also designed the Rodin Museum. The museum has, say, seven galleries – Eugene Boudin, Cassatt, Boudin, Forain, Gonzales, Manet and Monet. Visitors reach the main Eugene Boudin by an elevator, and they can enter and leave the exhibition only through Eugene Boudin gallery. Once inside, visitors are free to move as they choose. The following list includes all of the doorways that connect the seven galleries: There is a doorway between Eugene Boudin and Cassatt, a doorway between Eugene Boudinand Boudin, and a doorway between Eugene Boudin and Gonzales galleries. There is a doorway between Cassatt and Boudin galleries. There is a doorway between Gonzales and Forain and a doorway between Gonzales and Manet galleries. There is a doorway between Manet and Monet galleries. Which of the following rooms CANNOT be the third gallery that any visitor enters ?

1 Answers   TCS,


I have applied for the post of Section Engineer. plz anyone send me the previous question paper. i did my engineering in Information Technology.

0 Answers  


Email bombing is

1 Answers   NIC,


how to initialize a pointer to an array?

0 Answers   Convergys,


WHO IS STAR....?

1 Answers   TCS,


An inversion is an array of numbers is any pair (i,j) such that i<j and A[i]>A[j]. What is the average number of inversions in an array of n distinct numbers? plz GIVE ME SOLUTION

0 Answers   TCS,


describe what is const pointer and why do we need it?

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)