views:

43

answers:

1

Hey guys,

Oracle has a CLOB type and the function EMPTY_CLOB().

I'm looking for an alternative for use in SQL server.

Thanks in advance.

+4  A: 

A lot of older documentation and articles say that CLOB is equivalent to TEXT in MSSQL, but TEXT is now deprecated in favour of NVARCHAR(MAX). That assumes you have MSSQL 2005 or 2008, of course: 2000 only had TEXT.

As for EMPTY_CLOB(), I have no idea what it does but check out "Using Large-Value Data Types" in the MSSQL documentation for details of functions that you can use with NVARCHAR(MAX):

http://msdn.microsoft.com/en-us/library/ms178158.aspx

Pondlife
or you could use VARBINARY(MAX) which holds arbitrary, binary contents up to 2 GB in size
marc_s
@marc_s, that's correct but I guess the 'old' data type for binary data was IMAGE. The usual comparison with Oracle was TEXT = CLOB, IMAGE = BLOB.
Pondlife