Sql programming | Computer Science homework help

  

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.

Qualified Writings
Get 20% Discount on this Paper
Pages (550 words)
Approximate price: -

Why Work with Us

Top Quality and Well-Researched Papers

We always make sure that writers follow all your instructions precisely. You can choose your academic level: high school, college/university or professional, and we will assign a writer who has a respective degree.

Professional and Experienced Academic Writers

We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.

Free Unlimited Revisions

If you think we missed something, send your order for a free revision. You have 10 days to submit the order for review after you have received the final document. You can do this yourself after logging into your personal account or by contacting our support.

Prompt Delivery and 100% Money-Back-Guarantee

All papers are always delivered on time. In case we need more time to master your paper, we may contact you regarding the deadline extension. In case you cannot provide us with more time, a 100% refund is guaranteed.

Original & Confidential

We use several writing tools checks to ensure that all documents you receive are free from plagiarism. Our editors carefully review all quotations in the text. We also promise maximum confidentiality in all of our services.

24/7 Customer Support

Our support agents are available 24 hours a day 7 days a week and committed to providing you with the best customer experience. Get in touch whenever you need any assistance.

Try it now!

Calculate the price of your order

Total price:
$0.00

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essays

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.

Admissions

Admission Essays & Business Writing Help

An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.

Reviews

Editing Support

Our academic writers and editors make the necessary changes to your paper so that it is polished. We also format your document by correctly quoting the sources and creating reference lists in the formats APA, Harvard, MLA, Chicago / Turabian.

Reviews

Revision Support

If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.