Ispirer Website Ispirer Capabilities - Microsoft SQL Server Migration Free Trial

SQL Server Data Types - VARBINARY

Versions: SQL Server 2008, 2005, 2000, 7.0 and 6.5

Syntax VARBINARY[(n | max)]
Data Variable-length binary data
Parameters n is the maximum number of bytes, optional
Range 1 ⇐ n ⇐ 8000, if max is specified, the maximum size is 2G
Default n is 1
Version Differences SQL Server 2005 - max option is introduced
Storage Size actual entry length + 2 bytes
Standards SQL Server Extension

SQL Server VARBINARY - Equivalents in Other Databases

Database Data Type and Conversion
Oracle RAW(n), 0 ⇐ n ⇐ 2000, BLOB, 4G
MySQL VARBINARY(n), 1 ⇐ n ⇐ 65535; TINYTEXT, 255 bytes; BLOB, 65535 bytes
PostgreSQL BYTEA, 2G
Sybase ASE VARBINARY(n), 0 ⇐ n ⇐ pagesize (2K, 4K, 8K or 16K)
Informix BYTE, 2G, BLOB, 2T

Related Data Types in SQL Server

Data Types
Fixed-length binary data BINARY(n)
Variable-length binary data IMAGE

All Data Types

© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.