Reputation: 610
I'm trying to get employee's full name and combine them using MySQL function "Concat". Some of our employee don't have middle name and in this case SQL throws an error. How can i get full name of an employee even if the employee doesn't have middle initial.
SELECT CONCAT(`Employee`.`F_NAME`,
' ',
LEFT(`Employee`.`M_NAME`, 1),
'. ',
`Employee`.`L_NAME`)
FROM `Employee`
Upvotes: 1
Views: 106