View the Exhibit and examine the partial data in the PRODUCTS table. PROD_ID is the primary key. Examine the following code: What is the outcome on execution of the above code?
A.
It executes successfully.
B.
It gives an error because the DECODE function can be used only in a SQL statement.
C.
It gives an error because the SUBSTR and INSTR functions can be used only in a SQL statement.
D.
It gives an error because both the MAX and DECODE functions can be used only in a SQL statement.
Answer B is the right answer. Not all the functions are allowed in a pl/sql block. In this case for decode you will get the error ORA-06550: line 4, column 10:
PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL statement only
you can use DECODE and GROUP FUNCTION in SQL statements inside PL/SQL not in procedurals statements.
After testing:
"Rapport d'erreur -
ORA-06550: Ligne 13, colonne 18 :
PLS-00204: fonction ou pseudo-colonne 'DECODE' peut être utilisée uniquem. ds instruc. SQL
ORA-06550: Ligne 13, colonne 5 :
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:"
so B is the correct answer
This section is not available anymore. Please use the main Exam Page.1z0-144 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
okl
Highly Voted 5 years, 5 months agoCosminCof
5 years, 3 months agoPacogas
5 years, 2 months agotrex_fcs
Most Recent 2 years, 3 months agoPaps23
2 years, 8 months agoLimak665
4 years agoNonaPeach
4 years, 10 months agochaoyuim
5 years, 1 month ago