Tag Archives: where clause in SQL

SELECT statement and WHERE clause in SQL

002 – Selecting data with SQL – SELECT statement and WHERE clause in SQL

In this post we are going to take a look at the SELECT statement for selecting data and the WHERE clause for filtering the results.

Before everything else, we have to start the MySQL server, connect to it, and select a database. You can do that by running the following commands:

To start the MySQL server:


service mysql start

To connect to the MySQL server:

mysql -u root -p

To select the Chinook database:

use Chinook;

Ok, we selected the Chinook database. Since it is made of tables we want now to see the tables.

Continue reading