Explain why the insert statement for the view you created


1. Create a simple view named CUST_VIEW using the book_customer table that will display the customer number, first and last

name, and the state for every customer currently in the database. Define the view so that it will list the customer last names by

ascending order within the states in descending order. Now insert the following data into the book_customer table using an

INSERT statement. CUSTOMER# - 1021, FIRSTNAME - EDWARD, LASTNAME - BLAKE, STATE - TX. Now query your view and

display the new record.

2. Create a complex view named CUST_ORDER that will list the customer number, last name, and state from the

BOOK_CUSTOMER table and the order number and order date from the BOOK_ORDER table. Insert the following data into this

view: CUSTOMER# - 1022, LASTNAME - smith, STATE - Kansas, ORDER# - 1021, and ORDERDATE - 10-OCT-2004.

3. Explain why the insert statement for the view you created in #2 did not work.

4. Create a sequence that can be used to assign a publisher ID number to a new publisher. Define the sequence to start with

7, increment by two and stop at 1000. Name the sequence PUBNUM_SEQ.

5. Insert two new publishers into the PUBLISHER table, one named Double Week with a contact name Jennifer Close at

800-959-6321, and the second one named Specific House with a contact name Freddie Farmore at 866-825-3200. Use your

new sequence to create the PUBID for each record. Now query your PUBLISHER table to see your two new records.

6. Using a single query, query the PUBNUM_SEQ to determine what both the current sequence number is and the next

sequence number will be.

7. Create a unique index on the combined columns ORDER# and CUSTOMER# in the BOOK_ORDER table. Give the index a

name of BOO_ORDER_IDX.

8. Determine how many objects you currently own in your schema by querying the USER_OBJECTS view in the Data Dictionary.

Your result set should list the different object types that you find.

Attachment:- Deliverables.doc

Attachment:- LeeBooks.zip

Solution Preview :

Prepared by a verified Expert
Programming Languages: Explain why the insert statement for the view you created
Reference No:- TGS01241638

Now Priced at $30 (50% Discount)

Recommended (96%)

Rated (4.8/5)