Multiple choice technology databases

Identify the correct output --- select SUBSTR('ORACLE BASICS',-6,5) from dual;

  1. BASIC

  2. BASICS

  3. E BAS

  4. ORACL

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

SUBSTR with negative start position counts from the string's end. For 'ORACLE BASICS' (13 characters), position -6 is 'B' (6th from end). Starting there and taking 5 characters gives 'BASIC' (positions 8-12). This Oracle function is useful for extracting text from the right side.