| 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 |


On a relation named Loan of a bank: 