SQL Foundations  «Prev  Next»
Lesson 9The SELECT statement
ObjectiveLearn How to Use a very Simple SELECT Statement.

SQL SELECT Statement

How to Use SELECT Statement

We will now extract the information out of the table that we just put in.
The statement that you will use is a very simple SELECT statement. Do not worry about specifics yet, just look at what is happening.

SELECT * FROM BasicTable

The result is a listing of the rows in the table, similar to that shown below.
SELECT * from BasicTable

The SELECT statement says that you want all information, as indicated by the asterisk. If you had wanted only the contents of the Lastname column, you could have indicated that in place of the asterisk, and you would not have received the other columns in your results set.
The final step is to tell the engine where it can find the information. That is where the FROM clause comes in.
The slide show below shows the general process of adding and retrieving information from the database.
  1. You are at your computer when you realize that you need to add information to the database
  2. Using an INSERT statement, you send data from your computer to the database, where it is stored.
  3. When you need information, Use the SELECT statement to send a command to the database to return the results to your computer.

At the following link, you can read more about the SELECT statement .

Select Insert - Quiz

Click the Quiz link below to take a brief quiz about the SELECT and INSERT statements.
Select Insert - Quiz