Skip to content

UID

CREATE TABLE Employee (
ID INT AUTO_INCREMENT,
Name VARCHAR(255),
DOB DATE,
PRIMARY KEY (ID)
);
INSERT INTO Employee (Name, DOB)
VALUES ('John Doe', '1980-05-12');
Query OK, 0 rows affected (0.03 sec)
Query OK, 1 row affected (0.01 sec)

In the example above, a table “Employee” is created with the columns ID, Name, and DOB. The “ID” column is set as the primary key and is associated with AUTO_INCREMENT attribute. This assigns a unique identifier value (UID) to all new records in an ascending order starting from 1. When inserting a new row, the “ID” field is not required to be specified as it automatically increments.