CIS4365: Database Applications Fall, 2017 |
ProjectionUnderstanding the concept:
SQL performs this simple operation using the <fieldList> section of the SELECT statement by only including the fields that you list. For example, you could use the following statement to create an employee phone list: SELECT LastName, FirstName, Extension
FROM Employees
ORDER BY LastName, FirstName;
Remember that the ORDER BY clause does just that, it sorts the data; in this case, the list will be sorted alphabetically by the LastName field and then by the FirstName field. |