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

Examine the description of the PRODUCT_STATUS table:

The STATUS column contains the values IN STOCK or OUT OF STOCK for each row. Which two queries will execute successfully?

    Correct Answer: E, F

    The correct answers are those that correctly concatenate the prod_id column with the text using the appropriate syntax for string concatenation in SQL. Thus, the options that do this correctly are as follows: SELECT prod_id || q’(‘s not available)’ FROM product_status WHERE status = ‘OUT OF STOCK’; and SELECT prod_id || q’(‘s not available)’ “CURRENT AVAILABILITY” FROM product_status WHERE status = ‘OUT OF STOCK’;.

Discussion
ShrimathiOptions: EF

E;F tested

SantiBZ_07032022_1744Options: EF

E, F are right.

Cecilia_SosoOptions: EF

Tested column aliases cannot before the concatination unless you want to also inclunde them which means you need to add another ||

DarnunOptions: EF

EF are correct. A is incorrect as there are single & double commas instead of single commas only. Others are obviously wrong.

lucemqyOptions: EF

EF should be the correct answer