OnlinePCTips.com

PC Tips and Tricks to make your life easier
Subscribe

SQL SELECT Statement

July 24, 2009 By: bretthexum Category: Software

SQL Select Statement

The SQL SELECT statement queries data from selected tables in your database. The SELECT statement has three different parts: SELECT, FROM, and WHERE

SQL

The SELECT clause specifies which table columns you want to use for your query. The FROM clause specifies the tables accessed. The WHERE clause will specify which table rows are used, but this is optional. If you do not include WHERE all rows will be used

Example:

SELECT name FROM column1 WHERE value=’12′

This query accesses rows from the table – column1. It then filters those rows where the value column contains 12. Finally, the query retrieves the name column from each filtered row.