NullPointerException
NullPointerException

Reputation: 37635

Which is the biggest String type in SQL?

Which is the biggest possible String type in SQL?

TEXT? or another?

DBMS: SQLITE and MYSQL

Upvotes: 4

Views: 7005

Answers (2)

MicSim
MicSim

Reputation: 26796

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).

Upvotes: 9

Tom Anderson
Tom Anderson

Reputation: 47183

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.

Upvotes: 2

Related Questions