From the course: SQL Server 2008 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Changing the default database - SQL Server Tutorial
From the course: SQL Server 2008 Essential Training
Changing the default database
When you first begin working with SQL Server Management Studio, a lot of people do write queries. That's how they're getting to grips with the database and with SQL. Some folks can get a little frustrated by the fact that when you reopen Management Studio and click New Query, you will find this drop-down list of the default database often shifts back to whatever it was. Meaning that you have to remember to change it or to write the word USE AdventureWorksLT for example, or to include the name of the database in your SQL statement. And that can be a little annoying. Now what a lot of people try and do is they say, okay, if it keeps coming up with master or a different database, they go and look in say Tools > Options and they try and find some setting in SQL Server Management Studio where this is controlled. And they won't find one. So sometimes they give up and say, well, it's always going to be master or it's always going to be a particular database. Well, really, this setting has…
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)
-
-
-
-
-
-
-
-
-