Skip to content

INTEGER

CREATE TABLE Employee_Addresses (
ID INTEGER PRIMARY KEY,
Street VARCHAR(255),
City VARCHAR(255)
);
INSERT INTO Employee_Addresses (ID, Street, City)
VALUES (12345, '123 Maple Ave', 'New York');
SELECT * FROM Employee_Addresses;
+-------+---------------+-----------+
| ID | Street | City |
+-------+---------------+-----------+
| 12345 | 123 Maple Ave | New York |
+-------+---------------+-----------+

The ID column has a datatype of INTEGER, which holds a numerical value. In this instance, the ID for the newly created record in the Employee_Addresses table is 12345. This code snippet is an example of declaring a column as INTEGER, inserting an integer value, and then querying it.