Write a stored procedure, PL-SQL Programming

Assignment Help:

a. Create a table odetails_new. It has all the attributes of odetails and an additional column called cost, whose values are the product of the quantity and price of the part being ordered. Populate the table.

Tip: use insert into to populate the table. The cost can be computed in the select clause.

b. Create a table orders_new. It has all the attributes of orders and an additional column, called order_total, which is the total cost of an order. Populate the table.

Tip: use insert into to populate the table. The cost can be computed in the select clause.

c. Write a stored procedure that processes an update to a part's price. The procedure takes the part number and new price as input and performs an update to the price column of the parts table along with appropriate updates to the cost of odetails_new, and (extra credit) order_total (using native dynamic SQL)


Related Discussions:- Write a stored procedure

Read-only operator (+) - sql, Read-Only Operator (+) - SQL The term r...

Read-Only Operator (+) - SQL The term read-only operator to the mathematical term function. Here I just need to add that the SQL standard reserves the term function for read-

Bulk fetching - bulk bind performance improvement, Bulk Fetching The i...

Bulk Fetching The illustration below shows that you can bulk-fetch from a cursor into one or more collections: DECLARE TYPE NameTab IS TABLE OF emp.ename%TYPE; TYPE S

Expression in assignment statement - pl sql, Expression: This is a ran...

Expression: This is a randomly complex combination of constants, variables, literals, operators, & function calls. The simplest expression consists of a single variable. If th

Parameter and keyword description - update statement, Parameter and Keyword...

Parameter and Keyword Description:   table_reference: This keyword identifies the table or view that should be accessible when you execute the UPDATE statement, and for wh

Using inner join, Using INNER JOIN INNER JOIN is used to retrieve the ...

Using INNER JOIN INNER JOIN is used to retrieve the data from all tables listed based on a condition of equality listed after keyword ON. If the condition is not meet, rows ar

Example of coalesce operator - sql, Example of COALESCE operator Examp...

Example of COALESCE operator Example: Give the total of marks for each exam (simplified solution) SELECT CourseId, COALESCE ((SELECT SUM (Mark) FROM EXAM_MARK AS EM

Name resolution-naming conventions, Name Resolution In potentially uncer...

Name Resolution In potentially uncertain SQL statements, the names of the database columns take precedence over the names of the local variables and formal parameters. For e.g.

Assignment2, How do I display usernames for students from a student table, ...

How do I display usernames for students from a student table, assigning each student a username initials001 (initials is the actual student initials), and if the students initials

Albeit simple method , Albeit simple method : These all the truth tabl...

Albeit simple method : These all the truth tables give us our first as albeit simple method for proving a theorem: where check whether it can be written in propositional logic

Procedures - syntax, Procedures The procedure is a subprogram which can...

Procedures The procedure is a subprogram which can take parameters and be invoked. Normally, you can use a procedure to perform an action. The procedure has 2 sections: the spe

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd