Ans is
This is the most common Oracle Interview Questions asked in an interview. Constraints are the rules defined over data. Named constraint for a primary key can be added in two ways:
1. During table creation:
CREATE TABLE Employees (
Eid int NOT NULL,
Name varchar(255) NOT NULL,
Salary number(8),
Age int,
CONSTRAINT PK_ID PRIMARY KEY (Eid)
);
2. In the Alter statement
ALTER TABLE Employees
ADD CONSTRAINT PK_ID PRIMARY KEY (Eid);