SQL Basics Tutorial For Beginners | Select + From Statements | 2/4
Introduction to Select and From Statements
In this video, Alex Freiburg introduces the select and from statements in SQL. He uses two tables, employee demographics table and employee salary table, to explain how these statements work.
Select Statement
- The select statement is used to retrieve data from a database.
- Using the select statement with "select * from" retrieves all columns and rows of data.
- The "top" keyword can be used with the select statement to retrieve a specific number of rows.
- The "distinct" keyword can be used with the select statement to retrieve unique values in a specific column.
- The "count" function can be used with the select statement to count non-null values in a specific column.
- The "as" keyword can be used with the count function to give a name to the derived column.
From Statement
- The from statement specifies which table or tables are being queried.
- Alex uses the employee salary table to demonstrate how max, min, and average functions work in SQL.
Changing Databases
- When using multiple databases, it's important to specify which database you want to query in your from statement.
Overall, this video provides an introduction into using SQL's select and from statements. Alex explains how these statements work using examples that are easy for beginners to understand.
Sequel Basics
In this section, the speaker introduces the basics of SQL. The topics covered include the FROM statement, WHERE statement, GROUP BY statement and ORDER BY statement.
Introduction to SQL Basics
- The speaker introduces the basics of SQL.
- The speaker concludes by stating that they will cover more advanced concepts in future videos.