DBAS 32100 Midterm || A+ Guaranteed.
To print output to the console from a PL/SQL block, you can use the procedures in the ______________________________ package. correct answers DBMS_OUTPUT To repeatedly execute a statement or set of statements when you're using PL/SQL, you can code a simple loop, a WHILE loop, or a/an ______________________________ loop. correct answers FOR Assume that this is the start of the code for creating a stored procedure: CREATE OR REPLACE PROCEDURE update_credits ( in_param NUMBER, cr_param NUMBER ) AS Then, code the statement that you would use within a script to call the stored procedure and pass the values 47 and 200 to it. correct answers update_credits(47,200) When you create a scalar-valued function, you use the ______________________________ statement to specify the value that's returned by the function. correct answers RETURN To enforce data consistency, you can create a trigger that is fired ____________________ each row in a table is updated. correct answers BEFORE What keywords are used to determine a PL/SQL block? correct answers BEGIN and END What is the difference between a FOR loop and a WHILE loop? correct answers A FOR is used when the number of iteration IS known in advance. A WHILE loop is used when the number of iterations is NOT known in advance. What is the INTO clause for? correct answers The INTO clause is used to tell PL/SQL where to put data retrieved from a SELECT statement. What is an Exception? correct answers An Exception is an identifier within PL/SQL that can be used to trap for a specific condition. Exceptions are typically associated with an error. Exceptions are either raised automatically by PL/SQL or they can be raised explicitly. What is an Exception Handler? correct answers An Exception Handler is a section of PL/SQL code that is there purely to deal with any raised exceptions. What is a named cursor? correct answers A named cursor is a construct within PL/SQL that is used to retrieve data from the database. Name 3 keywords used with a named cursor. correct answers CURSOR, OPEN, FETCH
Información del documento
- Subido en
- 30 de abril de 2024
- Número de páginas
- 2
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas