Of course, the main reason for storing data in a database is so you can later look up, sort, and generate reports on that data. Basic data retrieval is done with the
SELECT statement, which has the following syntax:
SELECT column1, column2, column3 FROM table_name WHERE search_criteria;
The first two parts of the statement—the
FROM parts—are required. The
WHERE portion of the statement is optional. If it is omitted, all rows in the table
table_name are returned.
column3 syntax indicates the name of the columns you want to see. If you want to see all columns, you can also use the wildcard
* to show all the columns that match the search criteria. For ...