Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 148

Which two queries return the string Hello! We're ready? (Choose two.)

    Correct Answer: C, D

    To return the string 'Hello! We're ready' in SQL, we need to use methods that properly handle special characters like the single quote. Using the `q` syntax in Oracle SQL allows us to define alternative quoting mechanisms, making it easier to include single quotes in the string. The queries `SELECT q'!Hello! We're ready!' FROM DUAL;` and `SELECT q'[Hello! We're ready]' FROM DUAL;` both correctly handle the single quote within the string, ensuring the query executes without errors and returns the desired string. Other options either contain incorrect syntax or will not execute properly due to the way they handle the special characters.

Discussion
OrakolOptions: CD

A - ORA-00904 ERROR. B - ORA-00923 ERROR. C - Hello! We're ready D - Hello! We're ready E - ORA-00923 So correct: CD. I'm not sure what kind of Oracle Compiling tools use the people from other comments, but these are definitely the correct answers using Oracle Developer...

lucemqyOptions: CD

CD is the correct answer

WingLOptions: CD

100% C and D

zouveOptions: CD

CD are correct

Orxan_HOptions: CD

C D are correct

DarnunOptions: CD

CD is correct, checked in SQL Dev.

Zumrud_ApaydinOptions: DE

DE is correct answer