nerdexam
Oracle

1Z0-007 · Question #62

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'). INSTR is a character function return the numeric position of a named string. INSTR(NAMED,'a') Incorrect answer: B Did not return a numeric position for a'. C Did not return a numeric position for a'. D Did not return a numeric position for `a'.

Using Functions (Single-Row, Group, Conversion, Conditional)

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')
  • BSELECT ENAME, LENGTH(ENAME), INSTR(ENAME, ,-1,1)
  • CSELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1)
  • DSELECT ENAME, LENGTH(ENAME), SUBSTR(ENAME, -1,1)

How the community answered

(32 responses)
  • A
    78% (25)
  • B
    6% (2)
  • C
    3% (1)
  • D
    13% (4)

Explanation

INSTR is a character function return the numeric position of a named string. INSTR(NAMED,'a') Incorrect answer: B Did not return a numeric position for a'. C Did not return a numeric position for a'. D Did not return a numeric position for `a'.

Topics

#LENGTH#INSTR#SUBSTR#character functions

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice