SELECT CONCAT(SUBSTR('MINDWORKS',-5,6),SUBSTR('KNOWMAX',-3,4)) FROM DUAL;

  1. KNOWMIND

  2. WORKSM

  3. WORKSMAX

  4. MAXWORKS


Correct Option: C

AI Explanation

To answer this question, let's break down the query step by step:

The given query is:

SELECT CONCAT(SUBSTR('MINDWORKS',-5,6),SUBSTR('KNOWMAX',-3,4)) FROM DUAL;
  1. SUBSTR('MINDWORKS',-5,6):

    • This function extracts a substring from the string 'MINDWORKS'.
    • The starting point (-5) specifies that the substring should start from the 5th character from the end of the string.
    • The length (6) specifies that the substring should have a length of 6 characters.
    • Therefore, this expression returns 'WORKS'.
  2. SUBSTR('KNOWMAX',-3,4):

    • This function extracts a substring from the string 'KNOWMAX'.
    • The starting point (-3) specifies that the substring should start from the 3rd character from the end of the string.
    • The length (4) specifies that the substring should have a length of 4 characters.
    • Therefore, this expression returns 'MAX'.
  3. CONCAT(SUBSTR('MINDWORKS',-5,6),SUBSTR('KNOWMAX',-3,4)):

    • This function concatenates the two substrings obtained from the previous steps.
    • The result of the concatenation is 'WORKSMAX'.

Therefore, the correct answer is option C) WORKSMAX.

Find more quizzes: