Database Developer Question:

Tell me what is a CHECK constraint?

Tweet Share WhatsApp

Answer:

A CHECK constraint is used to limit the value that is accepted by one or more columns.

E.g. ‘Age’ field should contain only the value greater than 18.

CREATE TABLE EMP_DETAILS(EmpID int NOT NULL, NAME VARCHAR (30) NOT NULL, Age INT CHECK (AGE > 18), PRIMARY KEY (EmpID));

Download Database Developer PDF Read All 70 Database Developer Questions
Previous QuestionNext Question
Tell me can a table contain multiple FOREIGN KEY’s?Explain me the SELECT INTO statement?