Database Reference
In-Depth Information
Tip
How to Test Calculations
SELECT
provides a great way to test and experiment with
functions and calculations. Although
SELECT
is usually used to retrieve data from a
table, the
FROM
clause may be omitted to simply access and work with expressions.
For example,
SELECT 3 * 2;
would return
6
,
SELECT Trim(' abc ');
would
return
abc
, and
SELECT Now();
uses the
Now()
function to return the current date
and time. You get the idea—use
SELECT
to experiment as needed.
In this chapter, you learned what calculated fields are and how to create them.
We used examples demonstrating the use of calculated fields for both string
concatenation and mathematical operations. In addition, you learned how to
create and use aliases so your application can refer to calculated fields.