Question:medium

What is the output of the SQL statement?
SELECT MID('CUET2024',2,5)?

Updated On: Jan 16, 2026
  • UET2
  • ET202
  • UET20
  • CUET2
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Understanding the MID function
The MID() function in SQL extracts a substring from a string. Its syntax is MID(string, start, length), where:
- string denotes the original string.
- start specifies the 1-based position for extraction.
- length indicates the number of characters to extract.

Step 2: Applying MID to the given string
The SQL statement SELECT MID('CUET2024',2,5) is executed.
- String: 'CUET2024'
- Start Position: 2 (character 'U')
- Length: 5
Step 3: Extracting the Substring
Beginning at position 2 ('U') and extracting 5 characters yields the substring 'UET20'.
Output
The SQL statement results in UET20.
Correct Answer: UET20
Was this answer helpful?
0