Write a named stored procedure that attempts to delete all the rows from order_details and orders...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a named stored procedure that attempts to delete all the rows from order_details and orders tables when you pass it an order number. If you enter an invalid order_number and no rows were deleted, the system does not consider that to be an error. To check if a row is indeed deleted, use SQL%ROWCOUNT to return number of rows deleted. If the value of SQL%ROWCOUNT is zero, output a message stating that "No order rows were deleted. May not be a valid order_number". Otherwise, if the value is greater than zero, output a message that says "Order has been fully deleted.". Then, perform a commit. Once your procedure compiles correctly, test it with the following calls. --First Call-- CALL delete_detail_ID (10000); Sample Output: Order 10000 has been fully deleted. --Second and Third Calls-- CALL delete_detail_ID (10000); BEGIN END: / delete_detail_ID (11111); Sample Outputs: No order rows were deleted. May not be a valid order number Write a named stored procedure that attempts to delete all the rows from order_details and orders tables when you pass it an order number. If you enter an invalid order_number and no rows were deleted, the system does not consider that to be an error. To check if a row is indeed deleted, use SQL%ROWCOUNT to return number of rows deleted. If the value of SQL%ROWCOUNT is zero, output a message stating that "No order rows were deleted. May not be a valid order_number". Otherwise, if the value is greater than zero, output a message that says "Order has been fully deleted.". Then, perform a commit. Once your procedure compiles correctly, test it with the following calls. --First Call-- CALL delete_detail_ID (10000); Sample Output: Order 10000 has been fully deleted. --Second and Third Calls-- CALL delete_detail_ID (10000); BEGIN END: / delete_detail_ID (11111); Sample Outputs: No order rows were deleted. May not be a valid order number
Expert Answer:
Related Book For
International Marketing And Export Management
ISBN: 9781292016924
8th Edition
Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr
Posted Date:
Students also viewed these programming questions
-
Question 12, P 4-21 (sim... E Part 1 of 2 HW Score: 26.67%, 12 of 45 points O Points: 0 of 2 Save When you purchased your car, you took out a five-year annual-payment loan with an interest rate of...
-
(a) Use the following text to derive distributions for rat and chased. Use a five-word window, including open- and closed- class words, ignore case, punctuation and sentence boundaries and weight...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
The figure shows the result of taking 25 SRSs from a Normal population and constructing a confidence interval for the population mean using each sample. Which confidence level 80%, 90%, 95%, or 99%do...
-
The risk manager has 10 years of monthly data for a time series of realizations of the risk factor. The sample skewness and kurtosis are "0,2 and 3.5. Check whether these numbers are consistent with...
-
Write a numerical algorithm to solve Eq. 8.71 for \(A_{n}\). Obtain lift coefficients for \(h / 2 b=2\) and \(\mathrm{AR}=6,10\) at \(\mathrm{AoA}=12\). Eq. 8.71 Asin no 1 (y) 1 ban b 4h2b2 (cos...
-
In connection with a companys annual report, MD&A stands for: a. Management discussion and analysis. b. More depreciation and amortization. c. Monthly depreciation and amortization. d. Monthly...
-
Baden Corporation entered into a lease agreement for 10 photocopy machines for its corporate headquarters. The lease agreement qualifies as an operating lease in all terms except there is a...
-
A bond that matures in 10 years has a ?$1,000 par value. Theannual coupon interest rate is 9 percent and the? market's requiredyield to maturity on a? comparable-risk bond is 15 percent. What 1 answer
-
Zippy incurred the following medical expenses in the current year: Health insurance paid by her employer (high-deductible policy) 10,000 Health insurance she paid through her employer (pre-tax) 2,000...
-
:solve the homogenous differential equation dy = y-xy dx Q2: solve the differential equation after you find the integral factor (2x + y)dx-x dy = 0 (y + xy)dx-x dy = 0 Determine wither or not each of...
-
Solve the following equations. | G 5 a.- + 3 = C. X e. d. 1- f. 4 X+1 X-2 2x 2 5 1|2 3x X-4 2 3 X-2 = -8 x 6 + X-6 2 X-6 2x x-3 6 x-7x+12
-
ABC Corporation has provided the following data concerning manufacturing overhead for May: Actual manufacturing overheadincurredRs. 66,000 Manufacturing overhead applied to Work in ProcessRs. 62,000...
-
Households and firms are exposed to various risks. Risks facing households include sickness and disability, unemployment risk, consumer-durable asset risk, liability risk, and financial-asset risk...
-
Within a large rental corporation where the commercial rental segment dominated, Gary managed the residential rental segment. Gary enjoyed taking the underdog role, trying to generate more income and...
-
Settlers of Catan Co is authorized to issue an unlimited number of common shares and 10,000 preferred shares. During its first year, the business completed the following share issuance transactions:...
-
Given find the value of k. es 1 e kx dx = 1 4'
-
How can a company make operational use of the network model and relationship marketing in planning and implementing international marketing programmes?
-
Trust has been described as a key element of any relationship between exporter and importer. How does trust affect relationships, and how does an exporter adapt when cultures differ in their views of...
-
Hong Kongs unequalled bridging role linking European firms with China presented itself as an ideal opportunity for former corporate banker Jennifer Chan. After founding Sinova Management Consultancy...
-
Find the Internet site of Zysman Forensic Accounting, Inc. Where is the company located?
-
Find the Internet site "Forensic Accounting Demystified" and determine what types of assignments forensic accountants perform.
-
To what certificates do these abbreviations relate: a. CPA b. Cr.FA c. CFI d. CFE e. CA.IFA f. CVA g. CFFA h. CFD i. FCPA j. CFF
Study smarter with the SolutionInn App