You need to extract details of those products in the SALES table where the PROD_ID column contains
the string ‘_D123’.
Which WHERE clause could be used in the SELECT statement to get the required output?
A.
WHERE prod_id LIKE ‘%_D123%’ ESCAPE ‘_’
B.
WHERE prod_id LIKE ‘%\_D123%’ ESCAPE ‘\’
C.
WHERE prod_id LIKE ‘%_D123%’ ESCAPE ‘%_’
D.
WHERE prod_id LIKE ‘%_D123%’ ESCAPE ‘\_’
I think you are having trouble with \(backslash) and |(pipe) characters
option B: WHERE prod_id LIKE ‘%\_D123%’ ESCAPE ‘\’
option D: WHERE prod_id LIKE ‘%\_D123%’ ESCAPE ‘\_’
Question incorrect, I must to be:
A.WHERE prod_id LIKE ‘%_D123%’ ESCAPE ‘_’
B.WHERE prod_id LIKE ‘%\_D123%’ ESCAPE ‘\’
C.WHERE prod_id LIKE ‘%_D123%’ ESCAPE ‘%_’
D.WHERE prod_id LIKE ‘%\_D123%’ ESCAPE ‘\_’
Answer: B
There is not default escape character on Oracle.
Oscar I see you on “Comunidad Oracle Hispana”. Regards. Luis.
Thank you very much. Fixed.
Yes I am on COH. Saludos.