Consider the given SQL string :
"12#All the Best!"
Write suitable SQL queries for the following :
(i) Returns the position of the first occurrence of the substring "the" in the given string.
(ii) To extract last five characters from the string.
(i)
SELECT INSTR("12#All the Best!", 'the') AS the_position;
+--------------+ | the_position | +--------------+ | 8 | +--------------+
(ii)
SELECT SUBSTR("12#All the Best!", -5) AS last_five;
+-----------+ | last_five | +-----------+ | Best! | +-----------+