Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In SQL, 11 Directions: Use SQL Server to make the following changes to the Sports database. Save the queries in as Assignment.sql. The grading criteria

In SQL,
image text in transcribed
11 Directions: Use SQL Server to make the following changes to the Sports database. Save the queries in as Assignment.sql. The grading criteria is located in the Assignment 6 Assignment box in Blackboard. Create a Patient Large Balance table in the Sports database with the structure below. Column Type Length Decimal Nulls Description Places Allowed? Patient Nun CHAR 4 0 No Primary Key Last Name VARCIAR 25 0 No Last Name of Patient First Name VARCHAR 25 0 Yes First Name of Patient ZipCode CHAR 5 0 Patient Zip Code Balance DECIMAL 8 2 Yes Patient Balance Yes 2 1. Create a query to insert into the Patient_large_Balance table the patient number, last name, first name, zip code and balance for those patients whose balance is greater than 500.00. 2 Sports has increased the balance by $200.00 for each patient in zip codes in 74071 and 76658. Update the patient balances accordingly. 3. Insert a row into the Patient_large_Balance for a new patient. The patient number is 1022, the Last name is Brown, the first name is John, the zip code is 75212 and the balance is $755.35. 4. Delete the record from the Patient_large_Balance where the zip code is 74093. S. Sports Therapy increases the balance by 5% for all balances that are over 10 days old. Increase the balance for Patient numbers 1017 and 1020 by 5%. Hint: Multiply the balance by 1.05. 6. Patient number 1016 has continued her therapy and the new balance is unknown. Change the balance column for this patient to NULL 7. In the Patient_large_Balance, add a new character column to the table called Paid. 8. Set the value for the Paid column to N for all rows. 9. Change the value for the Paid column to Y for patients 1016 and 1020. 10. Change the first name column to reject nulls. 11. Delete Patient Large_Balance table from the database

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

What is IUPAC system? Name organic compounds using IUPAC system.

Answered: 1 week ago

Question

What happens when carbonate and hydrogen react with carbonate?

Answered: 1 week ago

Question

Question What are the advantages of a written bonus plan?

Answered: 1 week ago