How to define Check Constraint while creating Tables in Sql Server,Oracle and Ms-Access database?

 Posted by vishalneeraj-24503 on 9/1/2014 | Category: Sql Server Interview questions | Views: 1284 | Points: 40
Answer:

Following script creates a Check Constraint on Employee_Master table :-
Create Table Employee_Master

(
Employee_Id int not null Check ([PAN_Number] Is Not Null),
First_Name varchar(100) not null,
Middle_Name varchar(100),
Last_Name varchar(100) not null,
Employee_Name varchar(100) not null,
PAN_Number varchar(10) not null,
LDAP varchar(10) not null
)
)


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response