Say I have the following tables:
User(user_id, name, age,...)
Job(job_id, salary, user_id)
I want to have a constraint on Job
so that whenever the job's salary is > 20,000, the user doing the job must be of age >= 18. I have tried the CHECK
constraint but it seems to work on single table only?