From the course: SQL Server 2014 Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Basic SELECT statement

Basic SELECT statement - SQL Server Tutorial

From the course: SQL Server 2014 Essential Training

Start my 1-month free trial

Basic SELECT statement

- Alright, let's look at a very basic select statement. Here I am in SQL Server Management Studio, I'm going to create a new query. In the available database's drop-down I want to make sure I have selected AdventureWorks2014. I can go ahead and just type in a select statement that will query the database for some data. So we'll do SELECT *. Remember, the star will choose all of the columns from this table. Then I'll put in the keyword FROM, and then I need to say the name of the table. For this demonstration I'm going to go with HumanResources.Employee. And then I'll go ahead and execute that by clicking on the red exclamation point that is labeled as execute. And at the bottom I get some results, I get 290 rows. This output represents all of the data in that table, every row and every column. You can scroll over to the side and see all of the columns. We can scroll up and down and see that it's about 290 rows. For this query we did a SELECT * which gave us every column, realistically…

Contents