Binary Character data types

Following data types are used to hold the data in binary format

Binary: This is a fixed length Binary data type.

Syntax for using Binary data type is : Binary(N)

N varies from 1 to 8000.

Space required to hold a value with data type Binary(N) is N Bytes.


Varbinary: This is a variable length binary data type.

Syntax for using Varbinary data type is : Varbinary(N)

N varies from 1 to 8000.

Size of the Varbinary data type depends on the number of binary characters in the value.

Varbinary(Max) will be used to hold the binary characters whose length exceeds 8000 bytes.


Image:  This data type will be used to hold variable length binary data which needs space from 0 to 2^31-1 (2,147,483,647) bytes.

This entry was posted in . Bookmark the permalink.

Leave a reply