Oracle
1Z0-061 · Question #239
The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(4) LAST_NAME VARCHAR2 (25) JOB_ID VARCHAR2(10) You want to search for strings that contain 'SA_' in the JOB_ID column. Which SQL…
The correct answer is A. SELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA\_'. ESCAPE identifier to search for the _ symbol
Restricting and Sorting Data
Question
The EMPLOYEES table contains these columns:
EMPLOYEE_ID NUMBER(4) LAST_NAME VARCHAR2 (25) JOB_ID VARCHAR2(10) You want to search for strings that contain 'SA_' in the JOB_ID column. Which SQL statement do you use?
Options
- ASELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_'
- BSELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_';
- CSELECT employee_id, last_name, job_id FROM employees WHERE job_id LIKE '%SA_'
- DSELECT employee_id, last_name, job_id FROM employees WHERE job_id = '%SA_';
How the community answered
(28 responses)- A71% (20)
- B11% (3)
- C4% (1)
- D14% (4)
Explanation
ESCAPE identifier to search for the _ symbol
Topics
#LIKE operator#escape character#wildcard#pattern matching
Community Discussion
No community discussion yet for this question.