Question
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
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