<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><br>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I came across this (<a rel="nofollow" target="_blank" href="http://dev.mysql.com/doc/refman/5.0/en/char.html">http://dev.mysql.com/doc/refman/5.0/en/char.html</a>) and<br>
if you are using MySQL 5.0.3 or newer (which I am) then the length can be<br>
up to 65535.<br>
<br>
Is there any reason to use varchar2 over varchar or vice versa?</blockquote><div><br>> Another difference is varchar always pad stuff if the maximum length was not utilized, while varchar2 allow for variable size. <br>> 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. <br>> varchar2 does not handle it that way though. If you insert 10, it does not save 00010, but just 10<br><br>You've got the ride idea  but the details are wrong.  Varchar pads with spaces, not with 0's.<br>These days, basically always use varchar2 unless you're only storing a one-character flag,<br>in which case it's easiest to use char.<br><br>-M<br></div></div><br>
</div></div></div></body></html>