what is the difference between VARCHAR and VARCHAR2?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

A rectangular sheet dimensions a x b is to be made into an open-topped box by cutting a square of side h from each corner and folding the 4 sides up. Find the value of h which allows the maximum volume of the box?

729


why we use conio.h in c programming?

1669


Can u send me a sample Final year CSE student 'RESUME' for campus placement to following mail id: aspnetworks@gmail.com

3223


What is HPLC ? and define it.

1544


Difference in NS and TIA type HRC fuses

4035






I am pavani pursuing 4th B.Tech final semester i want to write the Group 2 Examination , Eligibility of that exam is all degree holders but to hold my Degree 3months are more. but the exam held on 3rd July 2012. i would be complete my B.Tech when exam to be held. so am i eligible to Group2 exam or not , please clarify my doubt.

1424


differance between radix sort and radix exchange sort

2850


what is difference between value datatype and object datattype

1388


I want the syllabus of Section Enginner(Signal & Telecom) of RRB Exam

2397


MY QUERY IS REGARDING AS/400. I AM FACING A PROBLEM IN UPDATING A PF COZ IT IS GETTING LOCKED SO I USED CHAIN(N) INSTEAD OF ONLY CHAIN.I ALSO TRIED UPDATE(E) ALONG WITH CHAIN(N),ITS NOT GIVING ANY ERROR BUT AT THE SAME TIME NOT UPDATING THE PF

1564


any one can help me to know the top mnc companies and their working platforms?i mean java,php...

1409


there are 50 users in a network, one system is virus affected , how to find that virus affected system?

1480


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

1289


multithreading??

1486


sir i have 4 year gap in engineering. i would complete my degree b.tech it in 2014. it will be may be in 2nd class.my hsc is also with 2nd class. i am week in programming. Then if i want highest package upto 5-6 lacs then what should i prepare myself as a good engineer to get this package???

1421