Sqlserver Interview questions


Total available count: 45
Subject - Databases
Subsubject - Sqlserver

What is Check Constraint?

  • A Check constraint is used to limit the values that can be placed in a column
  • If you define a CHECK constraint on a single column it allows only certain values for this column
  • The check constraints are used to enforce domain integrity
CREATE TABLE Company
(
    cid int NOT NULL CHECK(cid>0),
    companyname varchar(255),
)

 




Next 2 interview question(s)

1
What is Unique key constraint?
2
What is a Primary key?