In the column definition (column_definition), the memory requirement of a column value depends on the data type (data_type).
Data Type |
Memory Requirements of a Column Value in Bytes for This Data Type |
FIXED (p,s) |
(p+1) DIV 2 + 2 |
FLOAT (p) |
(p+1) DIV 2 + 2 |
2 |
|
9 |
|
9 |
|
21 |
|
9 |
|
CHAR (n); n<=30 |
n+1 |
CHAR(n); 30<n<=254; key column |
n+1 |
CHAR(n); 30<n<=254; not key column |
n+2 |
CHAR(n); 254<n |
n+3 |
CHAR(n) UNICODE; n<=15 |
2*n+1 |
CHAR(n) UNICODE; 15<n<=127; key column |
2*n+1 |
CHAR(n) UNICODE; 15<n<=127; not key column |
2*n+2 |
CHAR(n) UNICODE; 127<n |
2*n+3 |
VARCHAR (n); 30<n<=254; key column |
n+1 |
VARCHAR(n); 30<n<=254; not key column |
n+2 |
VARCHAR(n); 254<n |
n+3 |
VARCHAR(n) UNICODE; 15<n<=127; key column |
2*n+1 |
VARCHAR(n) UNICODE; 15<n<=127; not key column; |
2*n+2 |
VARCHAR(n) UNICODE; 127<n |
2*n+3 |