From the course: Microsoft SQL Server 2016: Query Data
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Querying a table with SELECT - SQL Server Tutorial
From the course: Microsoft SQL Server 2016: Query Data
Querying a table with SELECT
- [Instructor] In this lesson, we'll introduce the simple SELECT statement in transact SQL. We've got SQL Server Management Studio open. And we're going to demonstrate two different SELECT statements. The first one will simply return all of the attributes, or all of the fields, from the employee table. And in the second one, we'll be a little more selective on what we're returning by specifying column names. So let's dissect our first query. We're using the SELECT keyword, which indicates to SQL Server that we wish to return something from the database. The asterisk is telling SQL Server to return all of the attributes, or all of the columns or fields, depending on the terminology that you prefer to use. The FROM keyword is necessary. It has to tell SQL Server where we're going to pull the information from. And in this case, we have a two-part statement here. We have something called HumanResources. This is known as a schema name, or simply a schema. Schemas are used in our database…
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.