nerdexam
Oracle

1Z0-061 · Question #223

The EMPLOYEES table contains these columns: EMPLOYEE_ID NUMBER(4) ENAME VARCHAR2 (25) JOB_ID VARCHAR2(10) Which SQL statement will return the ENAME, length of the ENAME, and the numeric position of…

The correct answer is A. SELECT ENAME, LENGTH(ENAME), INSTR(ENAME, 'a') FROM EMPLOYEES WHERE. INSTR is a character function return the numeric position of a named string. INSTR(NAMED, 'a')

Using Single-Row Functions to Customize Output

Question

The EMPLOYEES table contains these columns:

EMPLOYEE_ID NUMBER(4) ENAME VARCHAR2 (25) JOB_ID VARCHAR2(10) Which SQL statement will return the ENAME, length of the ENAME, and the numeric position of the letter "a" in the ENAME column, for those employees whose ENAME ends with a the letter "n"?

Options

  • ASELECT ENAME, LENGTH(ENAME), INSTR(ENAME, 'a') FROM EMPLOYEES WHERE
  • BSELECT ENAME, LENGTH(ENAME), INSTR(ENAME, , -1, 1) FROM EMPLOYEES WHERE
  • CSELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1, 1) FROM EMPLOYEES WHERE
  • DSELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1, 1) FROM EMPLOYEES WHERE

How the community answered

(32 responses)
  • A
    72% (23)
  • B
    3% (1)
  • C
    6% (2)
  • D
    19% (6)

Explanation

INSTR is a character function return the numeric position of a named string. INSTR(NAMED, 'a')

Topics

#INSTR function#LENGTH function#character functions#pattern matching

Community Discussion

No community discussion yet for this question.

Full 1Z0-061 Practice