Previous Page
Next Page

Book Cover
Learning SQL on SQL Server
By Sikha Saha Bagui, Richard Walsh Earp
...............................................
Publisher: O'Reilly
Pub Date: April 2006
Print ISBN-10: 0-596-10215-1
Print ISBN-13: 978-0-59-610215-9
Pages: 342
 



Table of Contents  | Index

    Learning SQL on SQL Server
    Dedication
    Preface
      Why This Book?
      SQL and SQL Server
      Audience and Coverage
      A Few Notes About SQL Server Installation
      Conventions Used in This Book
      Using Code Examples
      How to Contact Us
      Acknowledgments
        Chapter 1.  Starting Microsoft SQL Server
      Section 1.1.  Starting Microsoft SQL Server and SQL Server's Management Studio
      Section 1.2.  Creating a Database in Microsoft SQL Server
      Section 1.3.  The Query Editor
      Section 1.4.  Creating Tables Using the Load Script
      Section 1.5.  Viewing Table Definitions
      Section 1.6.  Modifying Table Definitions
      Section 1.7.  Viewing Table Data
      Section 1.8.  Deleting a Table
      Section 1.9.  Deleting a Database
      Section 1.10.  Entering a SQL Query or Statement
      Section 1.11.  Parsing a Query
      Section 1.12.  Executing a Query
      Section 1.13.  Saving a Query
      Section 1.14.  Displaying the Results
      Section 1.15.  Stopping Execution of a Long Query
      Section 1.16.  Printing the Query and Results
      Section 1.17.  Customizing SQL Server
      Section 1.18.  Summary
      Section 1.19.  Review Questions
      Section 1.20.  Exercises
        Chapter 2.  Beginning SQL Commands in SQL Server
      Section 2.1.  Displaying Data with the SELECT Statement
      Section 2.2.  Displaying or SELECTing Rows or Tuples from a Table
      Section 2.3.  The COUNT Function
      Section 2.4.  The ROWCOUNT Function
      Section 2.5.  Using Aliases
      Section 2.6.  Synonyms
      Section 2.7.  Adding Comments to SQL Statements
      Section 2.8.  Some Conventions for Writing SQL Statements
      Section 2.9.  A Few Notes About SQL Server Syntax
      Section 2.10.  Summary
      Section 2.11.  Review Questions
      Section 2.12.  Exercises
        Chapter 3.  Creating, Populating, Altering, and Deleting Tables
      Section 3.1.  Data Types in SQL Server
      Section 3.2.  Creating a Table
      Section 3.3.  Inserting Values into a Table
      Section 3.4.  The UPDATE Command
      Section 3.5.  The ALTER TABLE Command
      Section 3.6.  The DELETE Command
      Section 3.7.  Deleting a Table
      Section 3.8.  Summary
      Section 3.9.  Review Questions
      Section 3.10.  Exercises
      Section 3.11.  References
        Chapter 4.  Joins
      Section 4.1.  The JOIN
      Section 4.2.  The Cartesian Product
      Section 4.3.  Equi-Joins and Non-Equi-Joins
      Section 4.4.  Self Joins
      Section 4.5.  Using ORDER BY with a Join
      Section 4.6.  Joining More Than Two Tables
      Section 4.7.  The OUTER JOIN
      Section 4.8.  Summary
      Section 4.9.  Review Questions
      Section 4.10.  Exercises
        Chapter 5.  Functions
      Section 5.1.  Aggregate Functions
      Section 5.2.  Row-Level Functions
      Section 5.3.  Other Functions
      Section 5.4.  String Functions
      Section 5.5.  CONVERSION Functions
      Section 5.6.  DATE Functions
      Section 5.7.  Summary
      Section 5.8.  Review Questions
      Section 5.9.  Exercises
        Chapter 6.  Query Development and Derived Structures
      Section 6.1.  Query Development
      Section 6.2.  Parentheses in SQL Expressions
      Section 6.3.  Derived Structures
      Section 6.4.  Query Development with Derived Structures
      Section 6.5.  Summary
      Section 6.6.  Review Questions
      Section 6.7.  Exercises
        Chapter 7.  Set Operations
      Section 7.1.  Introducing Set Operations
      Section 7.2.  The UNION Operation
      Section 7.3.  The UNION ALL Operation
      Section 7.4.  Handling UNION and UNION ALL Situations with an Unequal Number of Columns
      Section 7.5.  The IN and NOT..IN Predicates
      Section 7.6.  The Difference Operation
      Section 7.7.  The Union and the Join
      Section 7.8.  A UNION Used to Implement a Full Outer Join
      Section 7.9.  Summary
      Section 7.10.  Review Questions
      Section 7.11.  Exercises
      Section 7.12.  Optional Exercise
        Chapter 8.  Joins Versus Subqueries
      Section 8.1.  Subquery with an IN Predicate
      Section 8.2.  The Subquery as a Join
      Section 8.3.  When the Join Cannot Be Turned into a Subquery
      Section 8.4.  More Examples Involving Joins and IN
      Section 8.5.  Using Subqueries with Operators
      Section 8.6.  Summary
      Section 8.7.  Review Questions
      Section 8.8.  Exercises
        Chapter 9.  Aggregation and GROUP BY
      Section 9.1.  A SELECT in Modified BNF
      Section 9.2.  The GROUP BY Clause
      Section 9.3.  The HAVING Clause
      Section 9.4.  GROUP BY and HAVING: Aggregates of Aggregates
      Section 9.5.  Auditing in Subqueries
      Section 9.6.  Nulls Revisited
      Section 9.7.  Summary
      Section 9.8.  Review Questions
      Section 9.9.  Exercises
        Chapter 10.  Correlated Subqueries
      Section 10.1.  Noncorrelated Subqueries
      Section 10.2.  Correlated Subqueries
      Section 10.3.  Existence Queries and Correlation
      Section 10.4.  SQL Universal and Existential Qualifiers
      Section 10.5.  Summary
      Section 10.6.  Review Questions
      Section 10.7.  Exercises
        Chapter 11.  Indexes and Constraints on Tables
      Section 11.1.  The "Simple" CREATE TABLE
      Section 11.2.  Indexes
      Section 11.3.  Constraints
      Section 11.4.  Summary
      Section 11.5.  Review Questions
      Section 11.6.  Exercises
        Appendix A.  The Student Database and Other Tables Used in This Book
      Section A.1. 
        Appendix B.  Script Used to Create the Student_course Database
       Glossary of Terms
       Important Commands and Functions
    About the Author
    Colophon
    Index

Previous Page
Next Page