From the course: Querying Microsoft SQL Server 2022
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Solution: Write a SELECT query - SQL Server Tutorial
From the course: Querying Microsoft SQL Server 2022
Solution: Write a SELECT query
(upbeat music) - I hope you were able to locate all of the requested work orders. Let's go ahead and work through the solution. I'm going to go into my AdventureWorks database and find the table that we want to work with. And that was the production.workorder table. Let me just scroll down here and we'll find it right there. All right, I'll go ahead and expand that open and find our columns. So these are all the columns that we can work with. I actually like to run a simple select query just to pull everything out of the table so I can see what I'm starting with. So we'll just say select * from production.workorder. And we'll go ahead and execute that. So these are the columns and all the data that we can work with. Now for this question or for this challenge I asked to identify the work order. So we want to pull this work order ID column in our final solution. We also wanted to find just the work orders that had…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
What is Transact SQL?3m 22s
-
(Locked)
The SQL querying environment8m 6s
-
(Locked)
Return records with SELECT and FROM8m 45s
-
(Locked)
Filter records with WHERE4m 42s
-
(Locked)
Sort records with ORDER BY2m 57s
-
(Locked)
Column aliases2m 24s
-
(Locked)
Create values with constants and math4m 22s
-
(Locked)
Challenge: Write a SELECT query1m 15s
-
(Locked)
Solution: Write a SELECT query4m 14s
-
(Locked)
Solution: Query information from a database5m 32s
-
-
-
-
-
-
-
-
-
-