-1

I'm trying to add a column with VARCHAR(MAX) to a mySQL table, and i believe the syntax is correct, it's just not going through?

here is my code:

ALTER TABLE content ADD contents VARCHAR(MAX);

It says there is a problem with the MAX part of the code, even though I believe its correct, any help would be fantastic!

akemedis
  • 414
  • 2
  • 6
  • 17

1 Answers1

0

MySQL doesn't support the MAX operation. See here: Equivalent of varchar(max) in MySQL?

You can use: VARCHAR(65535), but remember that a few bytes are probably needed for the server to stored data, so something like: VARCHAR(65000) is safe.

artemis
  • 6,857
  • 11
  • 46
  • 99