Answered step by step
Verified Expert Solution
Question
1 Approved Answer
USE Nwind; CREATE TABLE Customer ( CustomerID char (5) NOT NULL, CompanyName varchar (40) NOT NULL, ContactName varchar (30) NULL, ContactTitle varchar (30) NULL, Address
USE Nwind; CREATE TABLE Customer ( CustomerID char (5) NOT NULL, CompanyName varchar (40) NOT NULL, ContactName varchar (30) NULL, ContactTitle varchar (30) NULL, Address varchar (60) NULL, City varchar (15) NULL , Region varchar (15) NULL, PostalCode varchar (10) NULL , Country varchar (15) NULL, Phone varchar (24) NULL , Fax varchar (24) NULL ) - LNSERT INTO Customer VALUES('FOLKO', 'Folk och f HB', 'Maria Larsson', 'Owner', 'kergatan 24', 'Brcke', NULL, 'S-844 67', 'Sweden', '0695-34 67 21',NULL); Please use the Customer.sql script provided with this test to create the Nwind database, the table called Customer, and the data in the Customer table. You will use the data in this table for the following questions. 6. Please create SELECT statements to accomplish each of the following. Please put all your answers in one script file called Select.sql and comment each statement with the question number it answers to identify it: a. The contact name, company name, and city (in that order) for all customers. (2 marks) b. The contact name, company name, and city (in that order) for all customers sorted by city. (2 marks) c. The company name and city (in that order) for companies in Germany, and sorted by city. (3 marks) d. The contact name, company name, city, country and phone number for all contacts that are Owners of companies in either Mexico (country) or France, and sorted by company name. (5 marks) 7. Please create DELETE statements for each of the following. Please put all your answers in one script file called Delete.sql and comment each statement with the question number it answers to identify it: a. Delete all records where there is no Fax number. ( 2 marks) b. Delete all records that have no region assigned if the company is in either France or Germany
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