Friday 13 November 2020

SQL: Text data types

Text data types are used to store large strings. By any chance if your data exceeds 65535 characters, you can use text data types.

 

Below table summarize text data types.

Data type

Maximum number of bytes

tinytext

255

text

65,535

mediumtext

16,777,215

longtext

4,294,967,295

 

Suppose I have a column with text type and I tried to insert more than 65535 characters, what is the behaviour?

Exceeded data will be truncated. Same applicable for other text data types too.

Previous                                                    Next                                                    Home

No comments:

Post a Comment