Is there a data type in the standard ANSI standard for storing an arbitrarily large string?

For my own fun, I am trying to write an SQL script to build a db that is as cross-RDBMS as possible. He will simply create a database, its tables and, possibly, fill it with some data.

One table contains coding problems, and I was wondering what data type should be used to describe the problem. If I used MySQL, I would just use the TEXT type, but I saw that this is not available in the standard SQL standard (ANSI).

Is there a data type available for arbitrarily large text data that will be standard SQL and compatible with Postgres / MySQL / MSSQL? Or do I just need to use a really huge VARCHAR and hope it is big enough?

+4
source share
2 answers

Standard SQL provides the CLOB type (large object symbol) for storing really large text objects. However, there are restrictions on what you can do with such objects, and perhaps your DBMS does not support type. There is also a BLOB type (binary large object).

, , , , . , , , , , , (, , ). , .

+4

: : ANSI- , , DMBS. . , - , - . , , .

, - , . , , , - , , .

, MySQL TEXT ( , 64 ), Postgres TEXT. MSSQL TEXT . , , (, SQL Server 2 ), , , , MSSQL 2Gb-length TEXT MySQL). - , , .

+2

All Articles