![]()
![]() ![]() ![]() ![]() ![]() ![]() ![]() Documentation Top ![]() Global Index ![]() Reference Manual ![]() ![]() ![]() Developer's Guide ![]() ![]() Tuning Cloudscape ![]() ![]() |
BITA BIT field allows you to store bit strings of a specified length. It is useful for unstructured data where character strings are not appropriate (e.g., images). Syntax for Column Definitionlength is an unsigned integer literal designating the length in bits. The default length for a BIT is 1. Corresponding Compile-Time Java Typebyte[] JDBC Metadata Type (java.sql.Types)BINARY BIT stores fixed-length bit strings. If a BIT value is smaller than the target BIT, it is padded with zeros. If a BIT value is larger than the target length, a bit right truncation exception is raised. Comparisons of BIT and BIT VARYING values are precise. For two bit strings to be equal, they must be exactly the same length. (This differs from the way some other DBMSs handle BINARY values but works as specified in SQL-92.) An operation on a BIT VARYING and a BIT value (e.g., a concatenation) yields a BIT VARYING value. Literal ExamplesYou can express bit literals in base-2 (binary) or base-16 (hexadecimal) format. Base-2 literals begin with B, and base-16 literals begin with an X. The type of a bit literal is always a BIT. When bit strings are converted to character strings, they are always represented in hexadecimal format. CREATE TABLE t (b bit(8)); Bit literals specified in binary format are taken to be the length of the number of bits represented. Bit literals specified in hexadecimal format are padded out to the nearest 8 bits. Therefore, X'a' is automatically converted to X'a0'. Implementation-Defined AspectsThe only limit on the length of BIT and BIT VARYING data types is the constraint of the integer used to specify the length, the value java.lang.Integer.MAX_VALUE. Internally, BIT/BIT VARYING columns are stored in eight-bit chunks. | ||
![]() ![]() ![]() ![]() ![]() ![]() | ![]() ![]() Cloudscape Version 3.0 ![]() For technical support, go to: www.cloudscape.com and click Support. Copyright © 1998 and 1999 Cloudscape, Inc. All rights reserved. |