Day 10

Quiz

1: Is there a limit to the number of columns in a table that can be defined as unique?
A1: There is no limit to the number of unique constraints that you can have in a table.
2: What does a check constraint do?
A2: A check constraint checks to see whether inserted data in a column meets certain criteria, as specified in the definition of the check constraint.
3: When inserting data into the database, which record must be inserted first, the parent or the child?
A3: The parent record must always be inserted first.
4: When deleting data from the database, which record must be deleted first, the parent or the child?
A4: The child record must always be deleted first.

Exercises

1: You created the CUST, STOCK, and MEDIA tables today. Perform the ...

Get Sams Teach Yourself SQL in 21 Days, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.