Dismiss Notice
Welcome to Our Community
Wanting to join the rest of our members? Feel free to sign up today.

Introducing the SELECT Statement

Discussion in 'Programming' started by gilbertsavier, Jul 2, 2009.

  1. gilbertsavier

    gilbertsavier New Member Webmaster

    The SELECT statement is constructed of clauses that let you look at data in a relational database. These clauses let you select columns and rows from one or more database tables or views, specify one or more conditions, order and summarize the data, and put the selected data in a temporary table.

    This chapter shows how to use five SELECT statement clauses. You must include these clauses in a SELECT statement in the following order:

    1. Projection clause
    2. FROM clause
    3. WHERE clause
    4. ORDER BY clause
    5. INTO TEMP clause

    Only the Projection and FROM clauses are required. These two clauses form the basis for every database query because they specify the tables and columns to be retrieved. Use one or more of the other clauses from the following list:

    * Add a WHERE clause to select specific rows or create a join condition.
    * Add an ORDER BY clause to change the order in which data is produced.
    * Add an INTO TEMP clause to save the results as a table for further queries.

    Two additional SELECT statement clauses, GROUP BY and HAVING, let you perform more complex data retrieval. They are introduced in Composing Advanced SELECT Statements.

    Thanks & regards,

Featured Resources (View All)

Share This Page