What is the difference between Text (fix)[CHAR] and Text[VARCHAR]? Explain giving suitable example.
Answers
Answered by
14
CHAR is a content of fixed length.
This basically means that you would only be able to store a certain amount of content in the page but in VARCHAR the length is not fixed.
CHAR has static memory allocation and it is fast. VARCHAR, on the other hand, is slower than CHAR and uses dynamic memory allocation.
Answered by
3
Answer:
TEXT has a fixed max size of 2¹⁶-1 = 65535 characters. VARCHAR has a variable max size M up to M = 2¹⁶-1 . So you cannot choose the size of TEXT but you can for a VARCHAR . The other difference is, that you cannot put an index (except for a fulltext index) on a TEXT column.
Similar questions
English,
7 months ago
Math,
7 months ago
English,
7 months ago
Computer Science,
1 year ago
Computer Science,
1 year ago
Chemistry,
1 year ago
Math,
1 year ago
Math,
1 year ago