what is the difference between VARCHAR and VARCHAR2?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 spooling and buffering?
Hello everybody, I have applied for the AAI jr executive ATC exam. I am from CSE branch. Is Exam paper for the CSE and other branches same or not? Because I don't have knowlwdge on Electronic subject? Can any one please send me the previous exam papers for AAI Jr Executive of CSE branch My id is: naveen.kocherla@gmail.com Thanks and Regards Naveen
Hello sir i finished my BE computer 2009 batch. I'm not gud at programming like 0 knowledge and i'm not interested in it too . Except this programming field is anyother option to afford into a new one ??????? can anyone help me plz
what is locative information on web.........?
What is the difference between tcp/ip protocol and IP protocol?
what is the use of typedef in c language?
which is better php,asp.net,jsp? and why?
What is a decade?
how to use photoshop and some related websites?
. There are two water tanks A and B, A is much smaller than B. While water fills at the rate of 1 liter every hour in A, it gets filled up like, 10, 20, 40,80, 160…..in tank B. (At the end of first hour, B has 10 liters, second hour it has 20 liters and so on). If tank B is 1/32 filled of the 21 hours, what is total duration of hours required to fill it completely?
y the range of char is between -128 to 127 only????
Please can any tell what is the difference between method overloading and overriding in c#.net ?