From the course: MySQL Data Analysis

Unlock this course with a free trial

Join today to access over 24,800 courses taught by industry experts.

The Big 6

The Big 6

- [Instructor] All right, let's get into some single table queries. First, I'm going to introduce you to what I call the big six elements of a SQL statement. Understanding these are probably the most important thing that I'm going to teach you during this course. First we have SELECT and FROM. SELECT is where you identify the columns that you want to pull into your results, and FROM is where you identify the table from which to pull those columns. The syntax looks just like this. SELECT some columnName FROM some tableName. The really nice thing about SQL is the syntax is pretty intuitive. You're pretty much just typing out what you want to do, selecting some data from some table. So this one's not too hard to remember. Every SQL statement that you're going to write will contain a SELECT and a FROM. The other four components of the big six are optional, and we'll get into those now. The WHERE clause is optional. This is how you're going to specify some filtering criteria to limit the…

Contents