Books & Videos

Table of Contents

  1. Chapter 1 Starting Microsoft SQL Server 2005

    1. Starting Microsoft SQL Server 2005 and SQL Server 2005’s Management Studio

    2. Creating a Database in Microsoft SQL Server 2005

    3. The Query Editor

    4. Creating Tables Using the Load Script

    5. Viewing Table Definitions

    6. Modifying Table Definitions

    7. Viewing Table Data

    8. Deleting a Table

    9. Deleting a Database

    10. Entering a SQL Query or Statement

    11. Parsing a Query

    12. Executing a Query

    13. Saving a Query

    14. Displaying the Results

    15. Stopping Execution of a Long Query

    16. Printing the Query and Results

    17. Customizing SQL Server 2005

    18. Summary

    19. Review Questions

    20. Exercises

  2. Chapter 2 Beginning SQL Commands in SQL Server

    1. Displaying Data with the SELECT Statement

    2. Displaying or SELECTing Rows or Tuples from a Table

    3. The COUNT Function

    4. The ROWCOUNT Function

    5. Using Aliases

    6. Synonyms

    7. Adding Comments to SQL Statements

    8. Some Conventions for Writing SQL Statements

    9. A Few Notes About SQL Server 2005 Syntax

    10. Summary

    11. Review Questions

    12. Exercises

  3. Chapter 3 Creating, Populating, Altering, and Deleting Tables

    1. Data Types in SQL Server 2005

    2. Creating a Table

    3. Inserting Values into a Table

    4. The UPDATE Command

    5. The ALTER TABLE Command

    6. The DELETE Command

    7. Deleting a Table

    8. Summary

    9. Review Questions

    10. Exercises

    11. References

  4. Chapter 4 Joins

    1. The JOIN

    2. The Cartesian Product

    3. Equi-Joins and Non-Equi-Joins

    4. Self Joins

    5. Using ORDER BY with a Join

    6. Joining More Than Two Tables

    7. The OUTER JOIN

    8. Summary

    9. Review Questions

    10. Exercises

  5. Chapter 5 Functions

    1. Aggregate Functions

    2. Row-Level Functions

    3. Other Functions

    4. String Functions

    5. CONVERSION Functions

    6. DATE Functions

    7. Summary

    8. Review Questions

    9. Exercises

  6. Chapter 6 Query Development and Derived Structures

    1. Query Development

    2. Parentheses in SQL Expressions

    3. Derived Structures

    4. Query Development with Derived Structures

    5. Summary

    6. Review Questions

    7. Exercises

  7. Chapter 7 Set Operations

    1. Introducing Set Operations

    2. The UNION Operation

    3. The UNION ALL Operation

    4. Handling UNION and UNION ALL Situations with an Unequal Number of Columns

    5. The IN and NOT..IN Predicates

    6. The Difference Operation

    7. The Union and the Join

    8. A UNION Used to Implement a Full Outer Join

    9. Summary

    10. Review Questions

    11. Exercises

    12. Optional Exercise

  8. Chapter 8 Joins Versus Subqueries

    1. Subquery with an IN Predicate

    2. The Subquery as a Join

    3. When the Join Cannot Be Turned into a Subquery

    4. More Examples Involving Joins and IN

    5. Using Subqueries with Operators

    6. Summary

    7. Review Questions

    8. Exercises

  9. Chapter 9 Aggregation and GROUP BY

    1. A SELECT in Modified BNF

    2. The GROUP BY Clause

    3. The HAVING Clause

    4. GROUP BY and HAVING: Aggregates of Aggregates

    5. Auditing in Subqueries

    6. Nulls Revisited

    7. Summary

    8. Review Questions

    9. Exercises

  10. Chapter 10 Correlated Subqueries

    1. Noncorrelated Subqueries

    2. Correlated Subqueries

    3. Existence Queries and Correlation

    4. SQL Universal and Existential Qualifiers

    5. Summary

    6. Review Questions

    7. Exercises

  11. Chapter 11 Indexes and Constraints on Tables

    1. The “Simple” CREATE TABLE

    2. Indexes

    3. Constraints

    4. Summary

    5. Review Questions

    6. Exercises

  1. Appendix The Student Database and Other Tables Used in This Book

  2. Appendix Script Used to Create the Student_course Database

  3. Glossary of Terms

  4. Important Commands and Functions

  5. Colophon