Description
If you're new to databases, or need a SQL refresher, this step-by-step introduction has everything you need to generate, manipulate, and retrieve data using Microsoft's SQL Server 2005. Every topic, concept, and idea in the book comes with examples of code and output, along with exercises to help you gain proficiency. Plenty of texts explain database theory. This book lets you apply the theory as you learn SQL.
Full Description
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
Product Details
- Title:
- Learning SQL on SQL Server 2005
- By:
- Sikha Saha Bagui, Richard Walsh Earp
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- April 2006
- Ebook Release:
- June 2009
- Pages:
- 352
- Print ISBN:
- 978-0-596-10215-9
- | ISBN 10:
- 0-596-10215-1
- Ebook ISBN:
- 978-0-596-10602-7
- | ISBN 10:
- 0-596-10602-5
Customer Reviews
