Oracle
1Z0-047 · Question #72
Evaluate the following SQL statement: SELECT product_name || 'it's not available for order' FROM product_information WHERE product_status = 'obsolete'; You received the following error while…
The correct answer is C. Use Quote (q) operator and delimiter to allow the use of single quotation mark in the literal character. See the full explanation below for the reasoning.
Question
Evaluate the following SQL statement:
SELECT product_name || 'it's not available for order' FROM product_information WHERE product_status = 'obsolete'; You received the following error while executing the above query:
ERROR:
ORA-01756: quoted string not properly terminated What would you do to execute the query successfully?
Options
- AEnclose the character literal string in the SELECT clause within the double quotation marks.
- BDo not enclose the character literal string in the SELECT clause within the single quotation marks.
- CUse Quote (q) operator and delimiter to allow the use of single quotation mark in the literal character
- DUse escape character to negate the single quotation mark inside the literal character string in the
How the community answered
(52 responses)- A8% (4)
- B4% (2)
- C73% (38)
- D15% (8)
Community Discussion
No community discussion yet for this question.