INT
INT
is a data type that represents a 32-bit signed integer. It can store numbers ranging from -2,147,483,648 to 2,147,483,647.
Syntax
Example
Precautions
- When using the
CAST
function to convert data of other types toINT
type, if the input data cannot be converted to an integer, it will return NULL by default. - When creating a table, you can specify a column as
INT
type to store integer values. - In queries, you can use
INT
type values for various calculations, such as addition, subtraction, multiplication, and division.