From the course: Complete Guide to T-SQL for Data Analysts by Microsoft Press
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Basic SQL - SQL Tutorial
From the course: Complete Guide to T-SQL for Data Analysts by Microsoft Press
Basic SQL
- [Instructor] All right, in this sub-lesson, we are going to look at basic SQL. So we're going to start diving into some of the individual clauses now. So, first, we'll take a look at the SELECT clause. Its purpose is, it retrieves rows and columns from one or more tables or views in a SQL Server database. It's the core of most queries. So we have the general syntax on the screen there where we can see we have the SELECT statement followed by the ALL keyword or DISTINCT, we'll discuss both later on. We can also add in a TOP ( expression ), or percentage, or WITH TIES, so if we have a situation where we want to get the top X number of rows from a result set with some different criteria. Once again, we'll talk about those ones as well, but this is our general SELECT clause criteria. Next, we'll take a look at the FROM clause. The FROM clause is usually required on the SELECT statement. It specifies the data source for a…
Contents
-
-
-
-
Learning objectives2m 29s
-
(Locked)
Introduction to writing SQL7m 55s
-
(Locked)
Basic SQL9m 22s
-
(Locked)
Filtering result sets: Basics4m 18s
-
(Locked)
Filtering result sets: Handling NULLS6m 48s
-
(Locked)
Filtering result sets: Next level38m 52s
-
(Locked)
Sorting result sets9m 14s
-
(Locked)
Single-row functions22m 23s
-
(Locked)
Aggregate functions5m 58s
-
(Locked)
Exercise3m 41s
-
-
-
-
-
-
-
-
-
-