Computer Science, asked by TbiaSamishta, 1 year ago

What is the difference between Text (fix)[CHAR] and Text[VARCHAR]? Explain giving suitable example.

Answers

Answered by aqibkincsem
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 manasvihooda83
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