-
varchar max size
Hi,
I want to use the varchar command in my table but it limits 255 and I want to limit at least 750 characters, is there any alternative?
-magik602
-
-
-
-
I can't set a limit, comes up with a syntax error saying
"You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(1000),"
-
-
TEXT is a variable-length datatype, you don't specify a maximum at design time.
TEXT is can store up to 2 ^ 16 - 1 (65,355) bytes (or single-byte characters). That should be more than sufficient for your purposes. If you need more, consider upgrading to MEDIUMTEXT (2 ^ 24 - 1 or 16,777,216) or LONGTEXT (2 ^ 32 or 4,294,967,296). The overhead is progressively larger for each, though, and if you only need a thousand characters TEXT should be fine, even with multi-byte encoding.
-
-
You misread what I'm asking, I already knew about text but I need to have the 1000 limit or thereabouts. With text, i can't set a limit as it is already 65000 something.
-
-
You'll need to set the limit in your script, I suspect.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks