Richard White wrote:
> HI,
> 
> Just wondering if anyone works with mysql and can help us understand this 
> little issue.
> 
> we understood that the maximum length for a varchar is 255. however we read 
> somewhere that since mysql version 5.0.3 the varchar maximum length is 767.
> 
> We have just been testing this theory and dont know why but the database is 
> allowing us to alter a columns data type to varchar(50000), if we set it to 
> varchar(65535) it tells us it is too big and that we need to include a text 
> data type instead. 
> 
> This is of course what we expected but we expected this error to occur way 
> before we was allowed to insert varchar(50000) and would have expected it on 
> either varchar(256) or varchar(768) depending on the version we have
> 
> Hope this makes sense and would really appreciate any help with understanding 
> this and how to best use the text and varchar data types

The VARCHAR maximum is 65535 - but it is subject to a limit on the size of 
entire row which is also 
65535 bytes - so you will seldom be able to use the VARCHAR maximum size of 
65535 unless you only 
have a single column.

See:  http://dev.mysql.com/doc/refman/5.0/en/char.html

-tom-

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291958
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to