OCP-1Z0-051-题目解析-第3题

3. 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 '\_'
Answer: B
题目解析:
题意是:要在Sales表中查询 PROD_ID字段中含有字符串'_D123'的行
_下划线在like字句中是代表任意一个字符,现在要匹配'_D123'就需要对_下划线进行转义,所以正确的答案是B,转义字符是'\'

posted @ 2014-06-25 18:02  wjx515  阅读(193)  评论(0编辑  收藏  举报