Blog series introduction

This blog series about SQL will be a combination of a review of SQL and new material.

Introduction

The basic structure of an SQL Query is as follows:

SELECT [COLUMN/COLUMNS (Separated by a comma)]
FROM [NAMEOFTABLE]
WHERE [CONDITIONS FOR WHAT THE SELECT STATEMENT IS SUPPOSED TO DISPLAY]

Example

Suppose we want to display all the users from the users table that have the status of active. We would write the query in the following manner:

SELECT id, first_name, last_name, user_id
FROM USERS
WHERE STATUS='Active'

If we wanted to select all the columns in the users table, we would do the following:

SELECT *
FROM USERS
WHERE STATUS='Active'