Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 DB2 中,是否有一种数据类型允许字符串像 SQL Server 数据库中的 Varchar(Max) 数据类型一样动态增长和收缩?
不,根据this和this,DB2 没有大容量文本类型。
您可以将VARCHAR(n)数据类型用于文本。请记住,这n是字节的最大长度,而不是字符长度。最大长度为 32704 字节。如果您使用的是 UTF-8 编码的数据库,这一点很重要。
VARCHAR(n)
n
它应该是“CLOB”
Guffa 的链接确实提到了这一点,但无法匹配 CLOB 和 VARCHAR。