Primary Key
A primary key in a table is a unique key that is the element in this column are unique and can not be null.
It is used to mantain the integrity.
It uniquely identify the row in the table.
It is a constraint on the table.
It can not have more than 16 columns.
It can also be a group of columns.
CREATE TABLE CUSTOMERS(
ID INT NOT NULL,
NAME VARCHAR (20) NOT NULL,
AGE INT NOT NULL,
ADDRESS CHAR (25) ,
SALARY DECIMAL (18, 2),
PRIMARY KEY (ID)
);
0 Comment(s)