w3resource

Basic SELECT statement: Get the name of all the employees from employees table

MySQL Basic Select Statement: Exercise-14 with Solution

Write a query to get the name (for example Ellen Abel, Sundar Ande etc.) of all the employees from employees table.

Sample table: employees


Code:

SELECT  CONCAT(first_name,' ', last_name) 'Employee Name' 
     FROM employees;

Pictorial Presentation of the above query


Result :


MySQL Code Editor:

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous: Write a query to calculate 171*214+625.
Next: Write a query to get first name of all employees table after removing white spaces from both side.

What is the difficulty level of this exercise?