I’m trying to truncate a column that I have created in my query to display only 15 characters, however I don’t know how to. In a table (yes), in a query (no).
How would I write my code to do this? Here’s the code:
(SELECT CONCAT(StudLName, ',',UPPER(StudFName)) AS StudentName FROM STUDENT);
Current result:
Advertisement
Answer
I think this is what you want:
(SELECT LEFT(CONCAT(StudLName, ',',UPPER(StudFName)),15) AS StudentName FROM STUDENT);