Database Reference
In-Depth Information
SELECT
clause
Fields to include in
the query results
76
Table from which
to select data
SQL reserved
words are written in
uppercase letters
Command ends
with a semicolon
FIGURE 3-2a
SQL query to select customer data (Access)
Figure 3-2b shows the MySQL query to select the number, name, and balance of all customers.
mysql> SELECT CustomerNum, CustomerName, Balance
-> FROM Customer
-> ;
FIGURE 3-2b
SQL query to select customer data (MySQL)
The results of executing the query shown in Figure 3-2a in Access 2010 appear in Figure 3-3a.
Fields in the SELECT
clause appear in the same
order in the results
All customer records are
included in the query results
FIGURE 3-3a
Query results (Access)
The results of executing the query shown in Figure 3-3a in MySQL appear in Figure 3-3b.
Search WWH ::




Custom Search