Skip to content
Advertisement

check statement add constraint

create table sallaary(

);

Now, this is my code. The idea of the first constraint “check_hours ” is to add a bonus to the employee if his work hours exceeded 40 hours but I don’t know how to write it

Note: the first constraint “check_hours ” is not complete

Advertisement

Answer

Hmmm . . . I think you want a bonus when the hours exceeds 40. If so:

Or equivalently:

Or, if bonus can be NULL:

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement