Create the given database with the condition that EMP_ID and FIRST_NAME will be the primary key of table and all unique values in LAST_NAME
CREATE TABLE My_database(
EMP_ID INT NOT NULL,
FIRST_NAME VARCHAR (20) NOT NULL,
LAST_NAME VARCHAR (20) NOT NULL,
SALARY DECIMAL (18, 2),
DEPARTMENT VARCHAR(25) NOT NULL,,
PRIMARY KEY (EMP_ID )
PRIMARY KEY (FIRST_NAME )
UNIQUE LAST_NAME
);
Comments
Leave a comment