Chat with us, powered by LiveChat Instructions:?? SQL Programming ? 4. Create an INVOICE_2 table f | Wridemy

Instructions:?? SQL Programming ? 4. Create an INVOICE_2 table f

  

SQL Programming
 

4. Create an INVOICE_2 table from the INVOICE table using a select statement.
 

5. Rename the INVOICE_2 table to INVOICE_3.
 

6. Add a comment to the INVOICE_3 table definitions describing the tables.
 

7. Drop the ITEMID column from the INVOICE table.
 

8. Create an INVOICE_4 table using a subquery based on the structure of the INVOICE table. Include only the ORDID, DESCRIPTION, PRODID and QTY columns. Name the columns in your new table INV ID, DESCRIPT, PROD ID and QUANTITY, respectively.
 

9. Add a first row of data to the INVOICE table with data of your own choosing. Do not list the columns in the INSERT clause.
 

10. Populate the INVOICE table with the sample data. You are to create the values to enter into the table. This time, list the columns explicitly in the INSERT clause.
 

ORDID, DESCRIPTION, ITEMID, ACTUALPRICE, QTY, ITEMTOT, PRODID
 

11. Create a script named LOAD_DATA_(your initials).sql to load rows into the INVOICE table interactively. Prompt the user for the values . Specify a default value for the QTY.
 

12. Populate the table with the four rows of sample data by running the script that you created.
 

13. Change the value for one of the DESCRIPTIONS.
 

14. Create a PRIMARY KEY constraint on the INVOICE table using the ORDID column. The constraint should be named at creation as a named table level constraint.
 

15. Add a named table level foreign key reference on the INVOICE table that will ensure that the PRODID is not assigned to a nonexistent PRODUCT.
 

16. Modify the INVOICE_3 table. Add an ORD_DATE column of DATE datatype.
 

17. Modify the INVOICE table. Add a CHECK constraint to prevent any ACTUALPRICE greater than what you think is a reasonable level.
 

18. Modify the INVOICE table by making one of the columns NOT NULL.
 

19. Create a view called INVOICE_View based on four columns in the INVOICE table. Use SQL*PLUS formatting commands to create column headings for the four columns.
 

20. Using your view INVOICE_View, enter a query to display values for three of the four columns included in the view.
 

21. Create a view named INV_VIEW_QUERY that does not allow an invoice DESCRIPTION to be changed through the view.
 

22. Create a sequence to be used with the primary key column of the INVOICE table. The sequence should start at 1000 and have a maximum value of 2000. Have your sequence increment by a single number. Name the sequence INVOICE_SEQ. Do not allow the sequence to cycle or cache.
 

23. Write an interactive script to insert a row into the INVOICE table. Name your script
Be sure to use the sequence that you created for the primary key column. Create a customized prompt to enter the DESCRIPTION. Execute your script.
 

24. Create a synonym for the INVOICE table.
 

25. Write a query to display the three columns of data for all employees with the same MANAGER_ID as Grant .
 

26. Create a query to display the employee number, last name and hire date for all employees who have a salary greater than the average salary. Sort the results in descending order of salary.
 

27. Create a report containing the employee name, address, city, and each employee’s salary. Label the columns with a different name than the column name. Break on the individual department numbers. Create a spool file for this problem.

    Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

    Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

    Do you need an answer to this or any other questions?

    About Wridemy

    We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

    How It Works

    To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

    Are there Discounts?

    All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

    Hire a tutor today CLICK HERE to make your first order

    Related Tags

    Academic APA Writing College Course Discussion Management English Finance General Graduate History Information Justify Literature MLA