Bit String Types

Use bit string data types to represent binary numbers. A bit string has these characteristics:

  • It’s an ordered sequence of zero or more bits.

  • Each bit has the value 0 or 1.

  • It typically is used to store binary data such as application files or digitized sounds and images. Long bit strings often are called binary large objects or BLOBs.

  • In SQL statements, a bit string is surrounded by single quotes.

  • It’s one of the types listed in Table 3.6.

✓ Tips

  • DBMSes don’t attempt to interpret bit strings; their meaning is up to the application.

  • For experienced programmers: In addition to using binary (base 2) form, you can represent bit strings in hexadecimal, or hex, (base 16) form. The hexadecimal system uses the digits 0 through 9 and the ...

Get SQL: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.