Database Reference
In-Depth Information
Figure 6.1
Data values in BUILDING table.
Figure 6.2
Data values in CLASSROOM table.
he SELECT clause is used to specify the column(s) to be selected by a query. he FROM
clause is used to specify the table(s) from which the columns are selected. he WHERE clause
speciies the condition(s) with which the rows are selected. To better understand the query pro-
cess, let us examine the data stored in the tables included in a database. he data in the Class
Registration database are listed in the tables shown from Figures 6.1 through 6.13.
In this chapter, you will query these tables to retrieve requested information.
6.2.1 Querying Data with SELECT, FROM, and WHERE Statements
Let us start with the SELECT-FROM statement that will return all the data from a table. For
example, to display all the information about the students stored in the table STUDENT, you can
use the following SQL statement:
SELECT *
FROM STUDENT
In the above SQL statement, the symbol * means that all columns in the table are selected.
Note that the SQL syntax is not case sensitive. he keywords, SELECT and FROM, and the
Search WWH ::




Custom Search