MySQL Primary Key

Profile picture for user arilio666

The primary key constraint is used to identify a record or row uniquely in a database, and it does not allow NULL values and accepts unique ones.

MySQL Create Table Primary Key

CREATE TABLE office (
emp_ID int ,
emp_fName varchar(255) NOT NULL,
emp_lName varchar(255) NOT NULL,
Age int
CHECK(Age <= 50),
PRIMARY KEY (emp_ID)
);
Tags