Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which is the biggest String type in SQL?

Tags:

sql

sqlite

mysql

Which is the biggest possible String type in SQL?

TEXT? or another?

DBMS: SQLITE and MYSQL

like image 704
NullPointerException Avatar asked Dec 21 '22 18:12

NullPointerException


2 Answers

The largest character data type in MySql is LONGTEXT (see Storage Requirements for String Types), that is capable to hold 2^32-1 bytes.

SQLite does not impose any length restrictions (other than the large global SQLITE_MAX_LENGTH limit) on the length of strings, BLOBs or numeric values. The default limit for that is 1 billion, but you can change it at compile time to a maximum of 2^31-1 (see Maximum length of a string or BLOB).

like image 53
MicSim Avatar answered Jan 02 '23 22:01

MicSim


CLOB.

The SQL standard uses the name CLOB (it's feature T041-02 in SQL2008), but note that other databases may have different names for it. I think TEXT is one.

like image 44
Tom Anderson Avatar answered Jan 02 '23 20:01

Tom Anderson