- Assignment #4 from 6/12/2015
-1- Using a subquery, write a SQL statement to update CUSTOMER_TBL.
-Find the customer with the order number 23E934, contained in the field
ORD_NUM, and change the customer name to DAVIDS MARKET.
-Assignment 6: Write a query for the following questions. Then, demonstrate how
you tune the query to make run more efficient.
-1.List the book code and book title of each book that has the type HOR or MYS.
-1.Create a procedure to display the first name and the last name of the author
whose number is supplied by the user.
CREATE PROC AuthorProfile
SET NOCOUNT ON
FROM AUTHOR WH
-After you run the script entitled "Final Exam - Creating the DB", you will
have a database called COP4723_Distributor,
-which is similar to the database you worked on for the midterm exam.
-The only difference is that there is a SALES_REP table that incl
create database COP4723_Distributor
CREATE TABLE SALES_REP
CHAR(2) PRIMARY KEY,
After you run the script entitled "Final Exam - Creating the DB", you will have a database called
COP4723_Distributor, which is similar to the database you worked on for the midterm exam.
The only difference is that there is a SALES_REP table that include
-1.Create a view called PenginUSA, which consists of the book code, title,
type and price for every book published by
-the publisher whose code is PE. Using the PenguinUSA view, write and
execute the command to retrieve the book code,
-1.Create a cursor within a procedure to retrieve and output the book code,
book title, book type, and
-price for every book whose publisher code is entered by the user.
CREATE PROC SG_PublisherBooks