Managing Constraints   «Prev  Next»

PRIMARY KEY Constraints - Exercise

Course project: Using primary Key Constraints

Objective: Create primary key constraints for the COIN database
<3>Exercise scoring
This exercise is worth a total of 24 points. Each completed block of code is worth 4 points. You will be graded on completeness and correctness of code. When you complete your answer, submit your answer.

Background and Overview

Earlier in this course, you created a script file with the SQL statements needed to create the tables in your COIN database. In this exercise, you will modify those scripts to include primary key constraints.

Download files

You can download a correct version of the script for this exercise, primarykey.sql, from the project download file found on the Resources page.


Add a primary key constraint for each table in the COIN database.


You can create a primary key that includes multiple columns by listing the columns, separated by commas.

Submitting your exercise

Submit your answer in the text box below.