Informatics Practices
Explain the MID() SQL function using suitable examples.
SQL Queries
2 Likes
Answer
The MID()
function returns a substring starting from the specified position. The syntax is:
MID(str, pos, len)
.
It returns a substring from str
starting at position pos
and containing len
characters. For example,
SELECT MID('Quadratically', 5, 6);
Output
+---------------------------+
| MID('Quadratically', 5,6) |
+---------------------------+
| ratica |
+---------------------------+
Answered By
2 Likes