Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL I need help with the following question. Thank you Consider the command to create a stored procedure that is shown in the figure (lines

SQL

I need help with the following question. Thank you

image text in transcribed

Consider the command to create a stored procedure that is shown in the figure (lines 95 through 114). Which of the following statement best describes the fuctionality of the stored procedure created by executing the command? 95 CREATE PROCEDURE update_invoices_credit total 96 ( 97 invoice_number_param IN VARCHAR2 98 credit total param IN NUMBER 99 update count OUT INTEGER 100 101 AS 102 BEGIN 03 UPDATE invoices 104 SET credit total credit total_param 105 WHERE invoice number invoice number param 106 SELECT COUNT INTO update_count 107 FROM invoices 108 WHERE invoice_number-invoice_number_param 109 COMMIT 110 EXCEPTION 1 WHEN OTHERS THEN 112 SELECT 0 INTO update count FROM dual 3 ROLLBACK 114 END 115 O When executed, the stored procedure updates the total credit applied to a particular invoice (one for which the invoice number is known), and it retums the number of records updated, which is aways 0 or 1 When executed, the stored procedure updates the total credit applied to a particular invoice (one for which the invoice number is known and it returns the number of records updated, whichis ahays1 ? When executed, the stored procedure updates the total credit applied to a particular invoice (one for which the invoice number is known and it returns the number of records updated O When executed, an exception wil always be thrown due to incorrect use of SELECT with INTO. Thus, the value returned will aways be 0 ? when executed, an exception wil a ways be thrown due to incorrect use o SELECT with INTO Thus no value will ever be returned by the stored procedure, but the credit total applied to an voice with a particular number may be changed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data 29th British National Conference On Databases Bncod 2013 Oxford Uk July 2013 Proceedings Lncs 7968

Authors: Dan Olteanu ,Georg Gottlob ,Christian Schallhart

2013th Edition

3642394663, 978-3642394669

More Books

Students also viewed these Databases questions