List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:December 29 2000 8:34pm
Subject:Re: TEXT columns
View as plain text  
At 10:56 AM -0800 12/29/00, Drummond wrote:
>Trying to create a TEXT column with a fixed length, is this possible?
>Some documentation shows that I can use CREATE TABLE table (column_name
>TEXT(lenght)); but I get an error 1064. If I use just TEXT it creates,
>but no fixed length. Using v 3.22.

TEXT(n) is syntax used by some other databases, but not MySQL.  You can
choose TINYTEXT, MEDIUMTEXT, TEXT, or LONGTEXT depending on the maximum
length value you'll need.  But they are all variable-length types.
If your values are <= 255 characters, use CHAR(n).

Paul DuBois, paul@stripped
TEXT columnsDrummond29 Dec
  • Re: TEXT columnsPaul DuBois29 Dec