VARBINARY(MAX) : VARBINARY « Data Types « SQL Server / T-SQL Tutorial






2> IF OBJECT_ID('dbo.CustomerData') IS NOT NULL
3>   DROP TABLE dbo.CustomerData;
4> GO
1>
2> CREATE TABLE dbo.CustomerData
3> (
4>   custid      INT            NOT NULL PRIMARY KEY,
5>   txt_data    VARCHAR(MAX)   NULL,
6>   ntxt_data   NVARCHAR(MAX)  NULL,
7>   binary_data VARBINARY(MAX) NULL
8> );
9> GO
1>
2> INSERT INTO dbo.CustomerData(custid, txt_data)
3>   VALUES(102, 'Customer 102 text data');
4> GO
1>
2> drop table CustomerData;
3> GO








5.26.VARBINARY
5.26.1.Binary Data Types
5.26.2.VARBINARY(MAX)
5.26.3.VARBINARY type variable
5.26.4.CONVERT (varbinary(8), @today)