Filtering Columns
If we do not want to select all columns, we can list the columns we want.
Suppose we only want to select the em_name and gender columns from the employees table, we write
SELECT em_name, gender from employees;
The table below shows part of the results from this SELECT statement:
Using Aliases
If you study the table above, you’ll notice that the table uses the column names (“em_name” and “gender”) as its column headings.
If we want the column heading to display a different name instead, we can use an alias for the column.
We do that using the AS keyword as shown in the following statement:
SELECT em_name AS `Employee Name`, gender AS Gender FROM employees;
In the statement above, note that we use the backtick character (normally found at the top left corner of the keyboard, together with the tilde ~ character) to enclose the first alias...