Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume you are running a football club and you wish to keep track of all your important players' details in a SQL database. i) Write

Assume you are running a football club and you wish to keep track of all your important players' details in a SQL database. 

i) Write the SQL query that will allow the manager to create a table named "Players" and have the fields as ID, FirstName, LastName, Age, PhoneContact and EmailAddress.

ii) Write the SQL query that will make the field "ID" a PRIMARY KEY and also an IDENTITY which is (1, 1).

iii)Write the SQL query that will allow users to use ORDER BY and see all the age in DESC order.

iv) Write the SQL query that will allow users to UPDATE the details of ID 3 where his age should be 22 rather than 32.

v) Write the SQL query that will allow users to add a new field using the ALTER command, the name of the field is "MiddleName" and it should be positioned after FirstName.

vi) Write the SQL query that will enable the users to DELETE a record where the Player ID.

vii) Write the SQL query that will allow the users to DELETE the entire records in the table.

viii) Write the SQL query that will allow the users to DROP the table called "Players" to make it seem that it didn't even exist.

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Answered: 1 week ago

Answered: 1 week ago

Question

Why might Pine Valley Furniture Company need a data warehouse?

Answered: 1 week ago