Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
The TINYINT data type is used to store unsigned integers requiring 1 byte of storage.
[ UNSIGNED ] TINYINT
The TINYINT data type is an exact numeric data type; its accuracy is preserved after arithmetic operations.
You can explicitly specify TINYINT as UNSIGNED, but the UNSIGNED modifier has no effect as the type is always unsigned.
The range for TINYINT values is 0 to 28 - 1, or 0 to 255.
In embedded SQL, TINYINT columns should not be fetched into variables defined as char or unsigned char, since the result is an attempt to convert the value of the column to a string and then assign the first byte to the variable in the program. Instead, TINYINT columns should be fetched into 2-byte or 4-byte integer columns. Also, to send a TINYINT value to a database from an application written in C, the type of the C variable should be integer.
SQL/2003 Vendor extension.