MySQL

William Muriithi william.muriithi-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon Jul 20 17:08:32 UTC 2009


>
>
> I came across this (http://dev.mysql.com/doc/refman/5.0/en/char.html) and
> if you are using MySQL 5.0.3 or newer (which I am) then the length can be
> up to 65535.
>
> Is there any reason to use varchar2 over varchar or vice versa?


Another difference is varchar always pad stuff if the maximum length was not
utilized, while varchar2 allow for variable size. What I mean by that is, if
you are using varchar and you insert 10, I think its saved as 010 where 255
is the maximum size. varchar2 does not handle it that way though. If you
insert 10, it does not save 00010, but just 10

Regards,

>
>
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gtalug.org/pipermail/legacy/attachments/20090720/3349c8b7/attachment.html>


More information about the Legacy mailing list