From the course: Microsoft SQL Server 2019 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Retrieve records with SELECT - SQL Server Tutorial
From the course: Microsoft SQL Server 2019 Essential Training
Retrieve records with SELECT
- [Instructor] The next SQL statement that I wanted to introduce you to is the SELECT statement. This one is probably the most common that you'll write, and it's for pulling data out of the database and asking questions about your data. The SELECT statement is literally a database query, and it's where Structured Query Language gets its name from. It starts with the keyword SELECT. We'll follow this with a list of column names that you want to retrieve in the order that you want them to appear in the results. We're going to pull information from the Rooms table, so I'm going to specify the RoomID. I'll type in a comma, the RoomNumber column, the BedType column, and the Rate column. After I've typed in the name of the last column that I want to return, I'll press the Enter key to come down to the next line. And then, I'll specify the FROM keyword and the table that I want to pull these columns from, in this case, the Rooms table. We'll finish the statement with the terminator…
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
-
-
-
-
-
-
-
(Locked)
Understand the role of T-SQL1m 59s
-
(Locked)
Use the T-SQL editor6m 4s
-
(Locked)
Create a table with T-SQL5m 28s
-
(Locked)
Add data to a table3m 41s
-
(Locked)
Retrieve records with SELECT3m 28s
-
(Locked)
Filter returned results with WHERE1m 51s
-
(Locked)
Sort records2m 42s
-
(Locked)
Delete records from a table3m 32s
-
(Locked)
Update records in a table3m 4s
-
(Locked)
Join related tables5m 1s
-
(Locked)
LEFT JOIN and RIGHT JOIN2m 16s
-
(Locked)
Remove a table from the database4m 6s
-
(Locked)
-
-
-
-
-
-