Show
13.2.13 SELECT Statement
A The most commonly used clauses of
For example:
You are permitted to specify
In general, clauses used must be given in exactly the order shown in the syntax description. For example, a The list of
The following list provides additional information about other
Following the
Which clause specifies the tables or views from which to retrieve the data?The FROM clause specifies one or more tables to be queried. Use a comma and space between table names when specifying multiple tables. The WHERE clause selects only the rows in which the specified column contains the specified value. The value is enclosed in single quotes (for example, WHERE last_name='Vader' ).
Which clause of the SELECT statement specifies the condition to filter the data?The WHERE and ORDER BY clauses are optional. The ORDER BY clause determines how the rows in the result set are to be sorted, and the WHERE clause determines which rows in the base table are to be included in the result set. The WHERE clause specifies a search condition that's used to filter the rows in the base table.
Which clause specifies the number of rows that should be retrieved?FETCH clause specifies the number of rows that should be retrieved after skipping the specified number of rows. If you omit the FETCH clause, all of the rows to the end of the set are retrieved.
How would you code a SELECT clause so it returns all columns from the base table?To return all of the columns from the base table, you can code the BLANK operator in the SELECT clause. To search for null values, use the BLANK clause. Unless you assign a/an BLANK, the column name in the result set is the same as the column name in the base table.
|