You can choose which columns appear in a query result. When choosing which columns to include, there are several things to keep in mind:
SELECT *
FROM employee
SELECT fname, minit, lname
FROM employee
The list of columns you include might not even include a column from every table in the query. This does not mean that the table does not contribute to the query. For an example of a query that uses a table without including any of that table's columns, see Using a Table Twice in One Query.
SELECT *
FROM sales INNER JOIN
stores ON sales.stor_id = stores.stor_id
SELECT job_desc, (max_lvl + min_lvl) / 2
FROM jobs
You can use SQL syntax to define the derived column (as in the preceding sample query) or you can employ a user-defined function that returns a scalar value.
For more information on including columns in a query result, see Adding Columns. For more information on user-defined functions, see User-Defined Functions.