XTRUST.ORG
XTRUST.ORG

Reputation: 3392

mysql | What is difference between SET and TEXT field types?

What is difference between SET and TEXT column types? I know that maximum length of SET column type is 64 elements. If I will use TEXT column type can I avoid this limit?

Upvotes: 0

Views: 86

Answers (2)

Mureinik
Mureinik

Reputation: 311163

set and text are two completely different things.

A set allows you to specify which values (up to 64) are allowed in a column, and input values that contain any unique combination of these values. text, on the other hand, is just a really long string.

Upvotes: 2

user4795756
user4795756

Reputation:

Yes, you can avoid this limit (64 elements), But TEXT type has its limits:

Maximum length (TEXT type): 65,535 (216−1) bytes = 64 KiB

For more information about maximum storage sizes types, see there:

TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT maximum storage sizes

Upvotes: 1

Related Questions