Binary datatypes  Entries of more than the maximum column size

Chapter 1: System and User-Defined Datatypes

Valid binary and varbinary entries

Binary data begins with the characters “0x” and can include any combination of digits, and the uppercase and lowercase letters A through F.

Use n to specify the column length in bytes, or use the default length of 1 byte. Each byte stores 2 binary digits. If you enter a value longer than n, Adaptive Server truncates the entry to the specified length without warning or error.

Use the fixed-length binary type, binary(n), for data in which all entries are expected to be approximately equal in length.

Use the variable-length binary type, varbinary(n), for data that is expected to vary greatly in length.

Because entries in binary columns are zero-padded to the column length (n), they may require more storage space than those in varbinary columns, but they are accessed somewhat faster.

If you do not use n to specify the length:





Copyright © 2005. Sybase Inc. All rights reserved. Entries of more than the maximum column size

View this book as PDF