Monday 7 October 2013

11. The check constraint is applied on the Number_of_days column of the LeaveDetail table. This check constraint ensures that the value inserted for the Number_of_days column is less than three. However, the leave of four days has been approved for John based on some valid reasons. The HR Manager wants to update the leave details for John but fails to assign the value, 4, in the Number_of_days column. As a database developer, what will you do to perform the preceding task?

Alter table LeaveDetail
Nocheck constraint chknoday

Insert into LeaveDetail valus('Tom','fever',4)

Alter table LeaveDetail
check constraint chknoday

No comments:

Post a Comment