My Account
View Cart
Home
Community
Books & Videos
Safari Books Online
Conferences
Training
School of Technology
About
Complete List
Bestsellers
New Releases
Rough Cuts
Upcoming Titles
Ebooks
By Publisher
By Series
Out of Print
Order Info
Search
Search Tips
Tell a friend
Learning SQL on SQL Server 2005
By
Sikha Saha Bagui
,
Richard Walsh Earp
April 2006
Pages: 342
|
Table of Contents
Table of Contents
Chapter 1
Starting Microsoft SQL Server 2005
Starting Microsoft SQL Server 2005 and SQL Server 2005's Management Studio
Creating a Database in Microsoft SQL Server 2005
The Query Editor
Creating Tables Using the Load Script
Viewing Table Definitions
Modifying Table Definitions
Viewing Table Data
Deleting a Table
Deleting a Database
Entering a SQL Query or Statement
Parsing a Query
Executing a Query
Saving a Query
Displaying the Results
Stopping Execution of a Long Query
Printing the Query and Results
Customizing SQL Server 2005
Summary
Review Questions
Exercises
Chapter 2
Beginning SQL Commands in SQL Server
Displaying Data with the SELECT Statement
Displaying or SELECTing Rows or Tuples from a Table
The COUNT Function
The ROWCOUNT Function
Using Aliases
Synonyms
Adding Comments to SQL Statements
Some Conventions for Writing SQL Statements
A Few Notes About SQL Server 2005 Syntax
Summary
Review Questions
Exercises
Chapter 3
Creating, Populating, Altering, and Deleting Tables
Data Types in SQL Server 2005
Creating a Table
Inserting Values into a Table
The UPDATE Command
The ALTER TABLE Command
The DELETE Command
Deleting a Table
Summary
Review Questions
Exercises
References
Chapter 4
Joins
The JOIN
The Cartesian Product
Equi-Joins and Non-Equi-Joins
Self Joins
Using ORDER BY with a Join
Joining More Than Two Tables
The OUTER JOIN
Summary
Review Questions
Exercises
Chapter 5
Functions
Aggregate Functions
Row-Level Functions
Other Functions
String Functions
CONVERSION Functions
DATE Functions
Summary
Review Questions
Exercises
Chapter 6
Query Development and Derived Structures
Query Development
Parentheses in SQL Expressions
Derived Structures
Query Development with Derived Structures
Summary
Review Questions
Exercises
Chapter 7
Set Operations
Introducing Set Operations
The UNION Operation
The UNION ALL Operation
Handling UNION and UNION ALL Situations with an Unequal Number of Columns
The IN and NOT..IN Predicates
The Difference Operation
The Union and the Join
A UNION Used to Implement a Full Outer Join
Summary
Review Questions
Exercises
Optional Exercise
Chapter 8
Joins Versus Subqueries
Subquery with an IN Predicate
The Subquery as a Join
When the Join Cannot Be Turned into a Subquery
More Examples Involving Joins and IN
Using Subqueries with Operators
Summary
Review Questions
Exercises
Chapter 9
Aggregation and GROUP BY
A SELECT in Modified BNF
The GROUP BY Clause
The HAVING Clause
GROUP BY and HAVING: Aggregates of Aggregates
Auditing in Subqueries
Nulls Revisited
Summary
Review Questions
Exercises
Chapter 10
Correlated Subqueries
Noncorrelated Subqueries
Correlated Subqueries
Existence Queries and Correlation
SQL Universal and Existential Qualifiers
Summary
Review Questions
Exercises
Chapter 11
Indexes and Constraints on Tables
The "Simple" CREATE TABLE
Indexes
Constraints
Summary
Review Questions
Exercises
Appendix A
The Student Database and Other Tables Used in This Book
Appendix B
Script Used to Create the Student_course Database
Glossary of Terms
Important Commands and Functions
Colophon
Return to
Learning SQL on SQL Server 2005