Question
Using the information provided in the Baseball Database documentation included in Module 1, write the DDL to create the Parks table. After you have created
Using the information provided in the Baseball Database documentation included in Module 1, write the DDL to create the Parks table. After you have created the table, load the data provided in the attachment.
99 - Parks_Data-2.sql Download 99 - Parks_Data-2.sql
Submit your answer as a single file with an SQL extension. For this assignment, your script is required to:
Write the DDL to create the Parks table. The script should include an IF statement (see script for creating the baseball database for examples) so that it could be run several times without changing anything in the script. See the 00 - Create Database.sql script for examples.
After loading the data to the table write the SQL using ATLER statements to create:
The appropriate primary key
A check statement to check that the country column contains one of these values: AU, CA, JP, MX, PR, UK, US
The Constrains must have a name included when you add the constraint. The constraint name must be different than the column the constraint is on. An example would be naming the primary key constraint Parks_PK
Your answer must be submitted as a .sql file. Your submission must include the SQL for steps 1 to 3. The INSERT statements to add the data do not have to be included. If your create table is correct, the data will load without problems.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started