Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the SQL code for the following: Q1 This question asks you to write the code ( SQL-Server) to do the following (label your answers
Write the SQL code for the following:
Q1 This question asks you to write the code ( SQL-Server) to do the following (label your answers using these numbers) 1. Create a database using your name 2. Create a single table using the parameters below 3. Insert the given data 4a. Show a result of retrieving the ids and names from the table 4b. Show a single result summary query that retrieves the count of the number of rows and label this as 'RowCount' and the maximum of the status, and label that column 'MaxStatus' 4c. Produce a single result that returns id, name and all locations that start with P. The details for questions Q1 (use the above numbers to label your answers) Write the SQL server code to create a database and use that in subsequent questions Write the code to create a table named Supplierxx where xxx is to be replaced with your initials.e.g., my table would be SupplierRR Column parameters: id of type integer, no nulls allowed, primary key name is to be with 10 maximum characters, no nulls allowed status is to be of type integer, not null and with a default of zero location is to be of type with 10 maximum character, no nulls there is a constraint on the location column that the city must be one of two {Phx, Tucson) Note: be careful of SQL reserved words 3. The accompanying Tuple Data Set 10 20 30 40 ABC DEF XXT ZZT 12 15 12 13 Phx Phx Tucson PhxStep 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