3. Calculated Fields and Aliases
In the previous chapter, we talked about how to choose individual columns for inclusion in a SELECT statement. We now want to introduce a way to perform calculations on the individual data items retrieved from a database. This technique is referred to as calculated fields. Using this approach, customer names can be formatted exactly as desired. Numeric calculations specific to a business or organization can be formulated and presented. In short, SQL developers are often required to customize the content of individual columns in order to successfully turn data into more intelligent information. The inclusion of calculated fields is a useful device that helps to accomplish that goal.