MS SQL Server Concepts and Programming Question:
What Are Binary String Data Types in MS SQL Server?

Answer:
Binary string data types are used to store binary strings. SQL Server 2005 supports the following binary string data types:
* BINARY - Binary strings with a fixed length of n bytes defined as BINARY(n). The maximum length is 8,000 bytes.
* VARBINARY - Binary strings with a variable length of n bytes defined as VARBINARY(n). The maximum length is 8,000 bytes. VARBINARY has a synonym of BINARY VARYING. VARBINARY also has special form as VARBINARY(MAX), which can store up to 2^31-1 bytes.
* IMAGE - Binary strings with a variable length up to 2^31-1 (2,147,483,647) bytes.
* BINARY - Binary strings with a fixed length of n bytes defined as BINARY(n). The maximum length is 8,000 bytes.
* VARBINARY - Binary strings with a variable length of n bytes defined as VARBINARY(n). The maximum length is 8,000 bytes. VARBINARY has a synonym of BINARY VARYING. VARBINARY also has special form as VARBINARY(MAX), which can store up to 2^31-1 bytes.
* IMAGE - Binary strings with a variable length up to 2^31-1 (2,147,483,647) bytes.
Previous Question | Next Question |
What Are Unicode Character String Data Types in MS SQL Server? | What Are the Differences between CHAR and NCHAR in MS SQL Server? |