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

Examine the description of the EMPLOYEES table:

Which two statements will run successfully? (Choose two.)

    Correct Answer: B, D

    The valid SQL statements should handle string concatenation correctly with respect to single quotes. Option B correctly escapes single quotes using '''' which concatenates a single quote around the first_name field. Option D simply concatenates 'The first_name is ' with the first_name field without any syntax errors. Other options either use mismatched quotes or invalid concatenation syntax. Therefore, options B and D are the correct choices.

Discussion
SushmasriOptions: BD

Can someone explain why B,D is correct ?

pmeyerOptions: BD

Who chose the correct answer?

MooonLight

I tried... none works.... anybody can explain even just a bit?

jfc1Options: BD

BD is the correct answer

dexdinh91Options: BD

BD are correct

cadcadleyOptions: BD

BD is correct regarding to try in SQL

Viviana3184Options: BD

BD are correct

RIDA_007Options: AC

D is incorrect, there is a missing single quote before the (||) operator

archit4321Options: BD

A. SELECT 'The first_name is " || first_name || " FROM (select 'user' first_name from dual); --O/P = ORA-00923: FROM keyword not found where expected B. SELECT 'The first_name is ''' || first_name || '''' FROM (select 'user' first_name from dual); --O/P = The first_name is 'user' C. SELECT 'The first_name is ''' || first_name || ''' FROM (select 'user' first_name from dual); --O/P = ORA-00923: FROM keyword not found where expected D. SELECT 'The first_name is ' || first_name || '' FROM (select 'user' first_name from dual); --O/P = The first_name is user E. SELECT 'The first_name is \" || first_name || '\" FROM (select 'user' first_name from dual); --O/P = ORA-24450: Cannot pre-process OCI statement

yaya32Options: BD

BD for me

lucemqyOptions: BD

BD is correct checked

jelenadinere_1

it depends on quotation mark, since we can not copy from this question normally you have to guess where are double qoutes and where are single ones, but if it like that: SELECT 'The first_name is ' " || first_name || ' ' " FROM temp; (column name || first_name || ' ' ) SELECT 'The first_name is ' " || first_name || ' " FROM temp; (column name || first_name || ' ) SELECT 'The first_name is ' || first_name || ' ' FROM temp; ( The first_name is Jhon ) then 3 answers are right: BCD

zouveOptions: BD

BD checked

CyberPOptions: BC

Why its BD ? explain the reason logically & don't tell me I tested it. In the exam there will be no tool to test anything if something changed so we need to understand the logic please.

kuffOptions: BD

BD is the answer

Poke90Options: BD

tested it

OrakolOptions: BC

*Tested in SQL* - BD are correct.