Number of columns and size

The maximum number of columns you can create in a table is:

The maximum size of a column depends on:

Table 8-3: Maximum row and column length - APL & DOL

Locking scheme

Page size

Maximum row length

Maximum column length

2K (2048 bytes)

1962

1960 bytes

4K (4096 bytes)

4010

4008 bytes

APL tables

8K (8192 bytes)

8106

8104 bytes

16K (16384 bytes)

16298

16296 bytes

2K (2048 bytes)

1964

1958 bytes

4K (4096 bytes)

4012

4006 bytes

DOL tables

8K (8192 bytes)

8108

8102 bytes

16K (16384 bytes)

16300

16294 bytes if table does not include any variable length columns

16K (16384 bytes)

16300 (subject to a max start offset of varlen = 8191)

8191-6-2 = 8183 bytes if table includes at least on variable length column.*

* This size includes six bytes for the row overhead and two bytes for the row length field

The maximum size of a fixed-length column in a DOL table with a 16K logical page size depends on whether the table contains variable-length columns. The maximum possible starting offset of a variable-length column is 8191. If the table has any variable-length columns, the sum of the fixed-length portion of the row, plus overheads, cannot exceed 8191 bytes, and the maximum possible size of all the fixed-length columns is restricted to 8183 bytes, when the table contains any variable-length columns.