This really is a how-to for beginners in MYSQL.
One of the important things to remember, is that case, for the most part, is ignored in MYSQL. So SELECT is the same as select.
It is also important to note that every command must be followed by the semi-colon, just as in the examples that follow.

Opening your database.

At the mysql prompt, the command show will help you get started.

Quote

mysql> show databases;

This will return all of the databases in mysql. To open one of the databases, try the following:

Quote

mysql> use DATABASE;

With the database open, you can look at all of the tables that currently exist.

Quote

mysql> show TABLES;

You won't have to 'use' or 'select' the table. The select command actually allows you to select the column within the given TABLE.

Quote

mysql> select first,last from TABLE;

This will select the column labeled first & the column labeled last from the given TABLE. You can use an * to select every column.

Quote

mysql> select * from TABLE;

If you don't care for the "side-to-side" look, you can get a column: value look using back-slash G.

Quote

mysql> select first,last from TABLE\G

You can also help make your output easier to read using limit.

Quote

mysql> select first,last from TABLE limit 5\G

Add order to your output using the order by option.

Quote

mysql> select first,last from TABLE limit 5 order by first\G

The data that we have retrieved so far was always displayed in the order in which it was stored in the table. Here I will show you how to filter the output results by asending or descending values. This will work with both alphabetical & numerical values.

Quote

mysql> select first,last from TABLE limit 5 order by first ASC\G
mysql> select first,last from TABLE limit 5 order by first DESC\G

This tutorial should get you well on your way to using the select statement in MYSQL.