A Practice Q from HackerRank. Very confused about the difference between left() and substring () in the case: Reference: https://www.hackerrank.com/challenges/the-pads/problem Considering the following, it is returned to Name(0)
SELECT CONCAT (NAME,'(',LEFT('Occupation',1),')')
FROM OCCUPATIONS
ORDER BY NAME
but the following is correct
SELECT CONCAT (NAME,'(',substring('Occupation',1,1),')')
FROM OCCUPATIONS
ORDER BY NAME