Examine the description of the EMPLOYEES table:
Which two statements will run successfully? (Choose two.)
Examine the description of the EMPLOYEES table:
Which two statements will run successfully? (Choose two.)
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.
Can someone explain why B,D is correct ?
Who chose the correct answer?
I tried... none works.... anybody can explain even just a bit?
BD is the correct answer
BD are correct
BD is correct regarding to try in SQL
BD are correct
D is incorrect, there is a missing single quote before the (||) operator
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
BD for me
BD is correct checked
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
BD checked
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.
BD is the answer
tested it
*Tested in SQL* - BD are correct.