Question: Assignment# 2 Write a stored procedure called projects _ at _ this _ location that receives a location and returns the projects ( if any
Assignment#
Write a stored procedure called projectsatthislocation that receives a location and returns the projects if any at that location as shown in the following sample run: points
exec projectsatthislocationStafford;
Projects at This Location
Computerization
Newbenefits
Write a function called returnlocation that receives a project number for some project and returns the location of this project. For example, if the function receives it returns Bellaire. points
Write an anonymous block to test the above function. Format the output like this assuming that the project number used is : point
The location of this project is Bellaire
For the following questions, create the following PRODUCT table and make sure to hand in the CREATE TABLE command for this table: point
Code : VARCHAR
Description : VARCHAR
Price : DECIMAL
Discount : NUMBER
SalePrice : DECIMAL
Designate Code as the primary key.
Write a statement level trigger called trgprod that when the Price and Discount of a product are inserted, the trigger calculates the SalePrice as the Price minus the product of Price and Discount. points
Test it like this:
INSERT INTO PRODUCTCodeDescription,Price,Discount VALUES ABDQ 'FLAT SCREEN TV
Check that the trigger set the SalePrice as indicated above which is going to be
Convert the trigger in the previous question from statement level to row level. Test it by inserting following product: points
INSERT INTO PRODUCTCodeDescription,Price,Discount VALUES ATTP 'VACUUM CLEANER',
Check that the trigger set the SalePrice which is going to be
In additon to submitting the code,make sure to include screenshots of testing the code if it workes.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
