This section describes how to create tables with BLOB (VARBINARY(MAX)) columns in SQL Server server.
SQL Server support BLOB with the regular VARBINARY data types, but with a special length value called MAX:
VARBINARY(MAX) - A BLOB column with a maximum length of (2**31 - 1) bytes, about 2GB.
In order to test BLOB columns in SQL Server server, I used the SQL Server commnand line interface
to create a test table with one BLOB column:
C:\>sqlcmd -S localhost -U Herong -P TopSecret
1> -- Set AdventureWorksLT as the current database
2> USE AdventureWorksLT;
3> GO
1> -- Create the test table with a BLOB column
2> CREATE TABLE Image (ID INTEGER PRIMARY KEY IDENTITY,
3> Subject VARCHAR(256) NOT NULL,
4> Body VARBINARY(MAX));
5> GO