From the course: SQL Server 2008 Essential Training
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Using SELECT statements - SQL Server Tutorial
From the course: SQL Server 2008 Essential Training
Using SELECT statements
Let's begin by going through some simple SQL to read or retrieve information from our database. I am going to open up SQL Server Management Studio and connect to my instance here. After it's open, the button that I am going to click is this one, the New Query button on the toolbar. A query, well, that's the Q in SQL. It's Structured Query Language. We write queries and this one will use the most common piece of SQL, the SELECT statement. We are selecting or choosing information from one of the tables in one of our databases. So I am going to write this phrase to begin with SELECT *, using the asterisk, From. I want to get everything from somewhere. Well, there's the question. Which database? Which table? Because in SQL Server Management Studio I can see that I have got quite a few databases, even the system databases. And I could be writing a select statement that goes against any of them. So I am first going to have to say which database I'm coming from. So I'm going to say I want to…
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)
Introduction to Transact-SQL3m 43s
-
(Locked)
Using SELECT statements7m 16s
-
(Locked)
Changing the default database2m 21s
-
(Locked)
Creating conditions in SQL8m 10s
-
(Locked)
Sorting your output3m 23s
-
(Locked)
Using aggregate functions7m 12s
-
(Locked)
Finding unique values2m 14s
-
(Locked)
Joining multiple tables together8m
-
(Locked)
Using subqueries9m 33s
-
(Locked)
Viewing execution plans3m 37s
-
(Locked)
-
-
-
-
-
-
-
-
-