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.

Introduction to SQL

July 24, 2009 By: bretthexum Category: Software

Introduction to SQL

SQL, also known as Structured Query Language, is a collection of data that resides in a file called a database. SQL is similar to other database languages, such as Oracle. For simplicity we’ll stick with SQL at this time.

SQL is a database language used to access and/or modify your database information.

SQL

A Few of the SQL commands we’ll cover in future articles are SELECT, DELETE, UPDATE, INSERT, WHERE, ORDER, plus more advanced topics such as JOIN, GROUP, and more.

More information on SQL

- Developed in 1974

- SQL is an ANSI (American National Standards Institute) standard

- SQL can execute queries against a database

- SQL can retrieve data from a database

- SQL can insert records in a database

- SQL can update records in a database

- SQL can delete records from a database

- SQL can create new databases

- SQL can create new tables in a database

- SQL can create stored procedures in a database

- SQL can create views in a database

- SQL can set permissions on tables, procedures, and views

Next topic: Basic SQL Commands