INT1
INT1 is a type of integer data in SQL. It stores whole numbers, from -128 to 127, and uses one byte of storage. This makes it suitable for small amounts of data that do not require the larger ranges provided by other integer data types like INT2, INT3, INT4, and INT8.
Example
Output
Explanation
In the above example, INT1 is used as a data type to limit the column ID. The INT1 data type in MySQL represents a very small integer that can store numbers from -128 to 127.
Example
Output
Explanation
The above code creates a table test
with a column ID
of the type INT1
. Then it inserts a row with the ID value as 5
. Finally, it selects all rows from the table, which is just the one row in this case.