House of Fusion
Home of the ColdFusion Community

Search cf-talk

December 02, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31       

Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

Max Varchar Length

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
HI,
Richard White
10/24/07 10:07 A
Richard White wrote:
Tom Donovan
10/24/07 10:36 A
Thanks for your help, much clearer now :)
Richard White
10/24/07 02:58 P
SQL 2005
Dale Fraser
10/24/07 04:55 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Richard White
10/24/2007 10:07 AM

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 thanks

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tom Donovan
10/24/2007 10:36 AM

Richard White wrote: ----- Excess quoted text cut - see Original Post for more ----- 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-

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Andy Matthews
10/24/2007 10:37 AM

I believe in newer versions of MySQL, there is only varchar and it can range from 1 to the max length which I believe is 65534. LargeText is for 65535 up to around 10 or 15 million characters. 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 thanks

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Richard White
10/24/2007 02:58 PM

Thanks for your help, much clearer now :)

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dale Fraser
10/24/2007 04:55 PM

SQL 2005 Varchar(MAX) Regards Dale Fraser http://learncf.com I believe in newer versions of MySQL, there is only varchar and it can range from 1 to the max length which I believe is 65534. LargeText is for 65535 up to around 10 or 15 million characters. 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 thanks

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Tom Chiverton
10/24/2007 10:31 AM

On Wednesday 24 Oct 2007, rwhite@j7isstudy.com wrote: > 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. Where did you read that ? Not in the manual, I guess: http://dev.mysql.com/doc/refman/5.0/en/char.html "The length can be specified as a value from 0 to 255 before MySQL 5.0.3, and 0 to 65,535 in 5.0.3 and later versions. " -- Tom Chiverton Helping to carefully orchestrate wireless schemas on: http://thefalken.livejournal.com **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF.  A list of members is available for inspection at the registered office.  Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP.  Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged.  If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.   If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com.


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists