| VARCHAR can store up to 2000 bytes of characters while VARCHAR2 can store up to 4000 bytes of characters. |
| If we declare datatype as VARCHAR then it will occupy space for NULL values, In case of VARCHAR2 datatype it will not occupy any space. |
| Name Varchar(10) - If you enter value less than 10, it utilize total 10 spaces. Name Varchar2(10) - If you enter value less than 10 then remaining space is not utilize. |
What is difference between varchar and varchar2
Subscribe to:
Post Comments (Atom)
Nice article.....
ReplyDeleteAddition to this
What Is The Difference Between Varchar And Varchar2
VARCHAR can store up to 2000 bytes of characters while VARCHAR2 can store up to 4000 bytes of characters.
DeleteIf we declare datatype as VARCHAR then it will occupy space for NULL values, In case of VARCHAR2 datatype it will not occupy any space.
Name Varchar(10) - If you enter value less than 10, it utilize total 10 spaces.
Name Varchar2(10) - If you enter value less than 10 then remaining space is not utilize.
GOOD ONE
ReplyDeletethanks a lot...clear
ReplyDeletethanks alot this is very helpful to me
ReplyDeleteThank
ReplyDeleteThank
ReplyDeletereally it's ...good
ReplyDeleteall the difference you mentioned above are false
ReplyDeleteThis comment has been removed by the author.
ReplyDeletethis is wrong answer.
Deletevarchar:If you enter value less than 10, it utilize total 10 spaces.
varchar2:If you enter value less than 10, it also utilize total 10 spaces.
Both are similar,the main difference is SIZE.
varchar size is 2000 byte
varchar2 size is 4000 byte.
Yes Mohit...
DeleteAbove statement is suitable for char function.
In char if you have entered 10 then it utilize total 10 spaces.
Acurate difference
ReplyDeletethere is no difference in varchar and varchar2,oracle reserved varchar for future reference..
ReplyDeletealso,varchar datatype is oracle create and varchar2 is ANSI CREATED
ReplyDeleteSimply and effective answer. Thumbs up
ReplyDeleteIn addition, varchar(10) is to reserve 10 characters for use, but varchar2(10) is to reserve 10 bytes length for use. If you have entered some UTF-8 code into the data table you'll see the difference. In this scenario, varchar2(10) can just hold 3 UTF-8 encoding characters while varchar(10) accomodates the whole 10.
ReplyDelete