Database Reference
In-Depth Information
After you have Microsoft SQL Server 2012 installed, you will need to read the introductory
discussion for using Microsoft SQL Server 2012 in Chapter 10A, starting on page 10A-1, and
create the Cape Codd database. SQL Server scripts for creating and populating the Cape Codd
database tables are available on our Web site at
www.pearsonhighered.com/kroenke
.
SQL Server 2012 uses the Microsoft SQL Server 2012 Management Studio as the GUI
tool for managing the Microsoft SQL Server 2012 DBMS and the databases controlled by
the DBMS. The Microsoft SQL Server 2012 Management Studio, which we will also refer to
as just the SQL Server Management Studio, is installed as part of the Microsoft SQL Server
2012 installation process and is discussed in Chapter 10. Figure 2-16 shows the execution of
SQL-Query-CH02-01 (note that the SQL comment is
not
included in the SQL statement as
run—also note that the SQL comment
could
have been included in the SQL code if we had
chosen to include it):
/* *** SQL-Query-CH02-01 *** */
SELECT
Department, Buyer
FROM
SKU_DATA;
Running an SQL Query in Microsoft SQL Server Management Studio
1.
Click the
New Query
button to display a new tabbed query window.
2.
If the Cape Codd database is not displayed in the Available Database box, select it
in the Available Databases drop-down list, and then click the
Intellisense Enabled
button to
disable
Intellisense.
3.
Type the SQL SELECT command (
without
the SQL comment line shown above):
SELECT
Department, Buyer
FROM
SKU_DATA;
Figure 2-16
Running an SQL Query
in Microsoft SQL Server
Management Studio
in the query window, as shown in Figure 2-16.
The
New Query
button
Available Databases
drop-down list-Select
the database here
The
Execute
button
The Cape Codd
database
The Cape Codd
database tables
The
Parse
button
The SQL query in the
tabbed query window
The
IntelliSense
Enabled
button
The
Results
tabbed
window
Search WWH ::
Custom Search