Answer: Following script creates a Check Constraint on
Employee_Master table :-
Create Table Employee_Master
(
Employee_Id int 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,
Check ([PAN_Number] Is Not Null)
)
Here, I have used a Check clause that is associated with the
PAN_Number column,which indicates that Pan Number
should not accept any null values.
Asked In: Many Interviews |
Alert Moderator