From the course: Learning SQL Server 2017
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Create a SELECT statement - SQL Server Tutorial
From the course: Learning SQL Server 2017
Create a SELECT statement
- [Instructor] When it's time to start retrieving information that's stored in your tables, you'll turn to an activity called querying the database. In order to query the database, you'll need to issue commands written in a language called Transact-SQL, or T-SQL if you prefer a shorter name. To get our first look at T-SQL, I'm going to drill down into a database called WideWorldImporters that we loaded in the last chapter. We'll come into the Tables folder, and I'm going to find a table here called Sales.Orders. Let's go ahead and right-click on it, and choose Select Top 1000 Rows. On the top of the query window, we have the exact syntax of the query, and down in the bottom we have the results. Let's focus on the query here at the top. It begins with the keyword SELECT. The SELECT clause tells the database what columns are going to be returned. In this case, we're returning the OrderID, the CustomerID, the…
Contents
-
-
-
-
-
-
(Locked)
Create a SELECT statement4m 56s
-
(Locked)
Use functions to calculate values5m 28s
-
(Locked)
Write an UPDATE statement3m 41s
-
(Locked)
Add data with an INSERT statement3m 50s
-
(Locked)
Create a view of the data7m 11s
-
(Locked)
Solution: Select data from a table2m 48s
-
(Locked)
Solution: Join related tables with a query3m 9s
-
(Locked)
Solution: Use functions to calculate values4m 50s
-
(Locked)
Solution: Update the data stored in a table6m 24s
-
(Locked)
-