Chapter 7. Introduction to the Database Query

In this seventh hour, you will learn about database queries, which involve the use of the SELECT statement. The SELECT statement is the most frequently used of all SQL commands after a database’s establishment. The SELECT statement allows you to view data that is stored in the database.

The highlights of this hour include:

  • What a database query is

  • How to use the SELECT statement

  • Adding conditions to queries using the WHERE clause

  • Using column aliases

  • Selecting data from another user’s table

What Is a Query?

A query is an inquiry into the database using the SELECT statement. A query is used to extract data from the database in a readable format according to the user’s request. For instance, if you have an employee ...

Get Sams Teach Yourself SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.