View previous topic :: View next topic
|
Author |
Message |
gvel19
New User
Joined: 20 Jul 2008 Posts: 19 Location: Schenactady, US
|
|
|
|
Hi,
We know that VARCHAR is a variable char and CHAR is a fixed char. If I declare CHAR(50) then 50 bytes will be allocated and used.
If I declare VARCHAR(50) and I'm giving the length as 10. Then only 10 bytes will be allocated and used.
Please correct me if i'm wrong.
Thanks,
Vel |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
according to the documentation, your interpretation is correct. |
|
Back to top |
|
|
Bill Dennis
Active Member
Joined: 17 Aug 2007 Posts: 562 Location: Iowa, USA
|
|
|
|
VARCHAR does use two extra bytes to indicate the actual length, so 12 bytes would be used. |
|
Back to top |
|
|
|