You are here:About>Computing & Technology>Databases> SQL Server> Binary Data Types in SQL Server
About.comDatabases

Binary Data Types in SQL Server

From Mike Chapple,
Your Guide to Databases.
FREE Newsletter. Sign Up Now!
Binary allow you to store any type of binary data, including entire files of up to 2GB.

Data types in the binary category include:
  • bit variables store a single bit with a value of 0, 1 or NULL.
  • binary(n) variables store n bytes of fixed-size binary data. They may store a maximum of 8,000 bytes.
  • varbinary(n) variables store variable-length binary data of approximately n bytes. They may store a maximum of 8,000 bytes.
  • varbinary(max) variables store variable-length binary data of approximately n bytes. They may store a maximum of 2 gigabytes.
  • image variables store up to 2 gigabytes of data and are commonly used to store any type of data file (not just images).
If the binary data types don’t suit your needs, read more about other SQL Server data types.
 All Topics | Email Article | Print this Page | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.