Question

Query Microsoft Access Write a CHECK constraint that expresses the following condition on table Schedule in...

Query Microsoft Access

Write a CHECK constraint that expresses the following condition on table Schedule in University Database: “In each term occurring in this table, at least two courses are offered”. Hint: Use NOT EXISTS.

Schedule
CourseId Term InstrId
CS 200 Fall 2016 003
CS 200 Fall 2017 003
CS 300 Spring 2017 003
CS 400 Fall 2016 004
CS 400 Fall 2017 004
Math 200 Fall 2016 001
Math 200 Spring 2017 004
Math 200 Fall 2017 001
Phys 400 Spring 2017 002
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution:

Query:

ALTER TABLE Schedule
   ADD CONSTRAINT myCheck CHECK(ScheduleRowcount(Courseid, Term)>= 2);

I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)

Add a comment
Know the answer?
Add Answer to:
Query Microsoft Access Write a CHECK constraint that expresses the following condition on table Schedule in...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT