Re: mysql lenght() and char_length not working for longer texts

From: Lennart Jonsson <erik.lennart.jonsson_at_gmail.com>
Date: Tue, 7 Jul 2015 08:30:54 +0200
Message-ID: <mnfrk9$k3f$1_at_dont-email.me>


On 07/07/2015 12:12 AM, Stefan Ram wrote: [...]
>
> mysql> CREATE TABLE T ( N VARCHAR( 65533 ) NOT NULL )
> -> ENGINE = MyISAM CHARACTER SET latin1;
> Query OK, 0 rows affected (0.00 sec)
>
>

Your missing my point, or perhaps I'm missing yours. I never claimed that it is not possible to create a table like that. The OP wants a way to restrict the maximum length of a column of type text to 32766 characters. My suggestion was to use a varchar(32766) instead of text. Can you explain how a varchar(65533) column can solve the OP's problem?

/Lennart Received on Tue Jul 07 2015 - 08:30:54 CEST

Original text of this message