Tuesday, July 22, 2008

TINYINT Sql-server Value

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.

http://www.visli.com/

No comments: