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

Example of foreign key constraint - sql, Example of Foreign Key Constraint ...

Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam

%notfound - explicit cursor attributes, %NOTFOUND The %NOTFOUND is log...

%NOTFOUND The %NOTFOUND is logical, opposite of the %FOUND. The %NOTFOUND yields FALSE if the last fetch returned a row, or TRUE when the final fetch failed to return a row. I

Managing cursors, Managing Cursors The PL/SQL uses 2 types of cursors: ...

Managing Cursors The PL/SQL uses 2 types of cursors: implicit and explicit. The PL/SQL declares a cursor implicitly for all the SQL data manipulation statements, including th

Parameter & keyword description - functions, Parameter & Keyword Descriptio...

Parameter & Keyword Description: function_name: The user-defined function is identifying by that keyword. parameter_name: This identifies the formal parameter that

Named notation, Named Notation The second procedure call uses the name...

Named Notation The second procedure call uses the named notation. An arrow (=>) serve as the relationship operator that associates the formal parameter to the left of the arro

Existential quantification - sql, Existential Quantification - SQL Ex...

Existential Quantification - SQL Existential quantification-stating that something is true of at least one object under consideration-can be expressed by OR(r,c), meaning tha

Parameter and keyword description - packages, Parameter and Keyword Descrip...

Parameter and Keyword Description: package_name: This construct identifies the package. AUTHID Clause: This determine whether all the packaged subprograms impleme

Implicit rollbacks, Implicit Rollbacks Before execute the INSERT, UPDA...

Implicit Rollbacks Before execute the INSERT, UPDATE, or DELETE statement, the Oracle marks an implicit savepoint . When the statement fails, the Oracle rolls back to the save

Relational operators-comparison operators, Relational Operators The rela...

Relational Operators The relational operators permit you to compare randomly complex expressions. The list below provides the meaning of each operator:

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