Book description
SQL is a solid guide and reference to the key elements of SQL and how to use it effectively. Developed by authors who needed a good resource for students in their database class, this is an ideal supplement for database courses — no matter what main text you use or what flavor of SQL is required.
It features a short and inexpensive introduction to SQL for students who have some programming experience and need to learn the main features of SQL; and suggested shortcuts for learning and practice, depending on the experience of the user.
This book is recommended for novice developers, programmers, and database administrators as well as students in database courses, business courses, and IT-related courses.
- Provides tutorial-based instruction for the main features of SQL for programmers and other technical professionals in need of a brief but really good introduction to SQL.
- The approach is vendor-neutral—so very adaptable and flexible
- The focus is on teaching concepts by walking through concrete examples and explanations, and self-review exercises are included at the end of each chapter.
- Coverage is on the key features of the language that are required to understand SQL and begin using it effectively.
- SQL 2003-compliant.
Table of contents
- Cover
- SQL: Practical Guide for Developers
- Copyright
- Table of Contents (1/2)
- Table of Contents (2/2)
- Preface
- Chapter 1. Databasics
-
Chapter 2. Retrieval: Basic SELECTion
- 2.1 Simple SELECT
- 2.2 Selecting Rows
- 2.3 Standard Comparison Operators
- 2.4 String Comparisons
- 2.5 Matching String Patterns with LIKE
- 2.6 Getting What We Haven't Got with NOT
- 2.7 Combining Conditions with AND and OR
- 2.8 Selecting a Range of Values with BETWEEN
- 2.9 Selecting a Set of Values Using IN
- 2.10 IS NULL: Exploring the Unknown
- 2.11 ANDs, ORs, NOTs with NULLs: Three-Valued Logic
- 2.12 Three-Valued Logic and the IN Operator
- 2.13 How WHERE Determines What's In and Out
- 2.14 Wrap Up
-
Chapter 3. Reshaping Results
- 3.1 AS: Naming Result Table Columns
- 3.2 DISTINCT and ALL: Dealing with Duplicates
- 3.3 Derived Attributes (1/2)
- 3.3 Derived Attributes (2/2)
- 3.4 Computation in the WHERE Clause
- 3.5 ORDER BY: Ordering Result Table Traversal
- 3.6 CAST: Data Type Conversion
- 3.7 CASE, COALESCE, and NULLIF: Conditional Expressions
- 3.8 Wrap Up
-
Chapter 4. Aggregating Results
- 4.1 Aggregation Functions
- 4.2 Removing Rows before Aggregation with WHERE
- 4.3 Removing Repeating Data with DISTINCT before Aggregation
- 4.4 Mixing Attributes, Aggregates, and Literals
- 4.5 Group Aggregation Using GROUP BY
- 4.6 Removing Rows before Grouping with WHERE
- 4.7 Sorting Groups with ORDER BY
- 4.8 Removing Groups with HAVING
- 4.9 Aggregates over Expressions
- 4.10 Wrap Up
-
Chapter 5. Joins
- 5.1 Two Table Joins with WHERE
- 5.2 Table Aliases
- 5.3 Joins Needing More Than Two Tables
- 5.4 Self-Join: Joining a Table with Itself
- 5.5 Example Joins
- 5.6 How Does a Join Really Work?
- 5.7 Theta Joins: Generalizing Join Predicates
- 5.8 JOIN Operator (1/2)
- 5.8 JOIN Operator (2/2)
- 5.9 Join Strategies
- 5.10 Wrap Up
- Chapter 6. Set Queries: UNION, INTERSECT, and EXCEPT
-
Chapter 7. Subqueries
- 7.1 What Are Subqueries?
- 7.2 Multilevel Subquery Nesting
- 7.3 Subqueries Using NOT IN
- 7.4 Subqueries with Empty Results
- 7.5 Combining JOIN and Subqueries
- 7.6 Standard Comparison Operators with Lists Using ANY, SOME, or ALL (1/2)
- 7.6 Standard Comparison Operators with Lists Using ANY, SOME, or ALL (2/2)
- 7.7 Correlated Subqueries
- 7.8 EXISTS
- 7.9 Derived Relations„Subqueries in the FROM Clause
- 7.10 Subqueries in the HAVING Clause
- 7.11 Subset Queries (1/2)
- 7.11 Subset Queries (2/2)
- 7.12 Subqueries in the SELECT Clause
- 7.13 Wrap Up (1/2)
- 7.13 Wrap Up (2/2)
- Chapter 8. Modifying Data
-
Chapter 9. Creating, Deleting, and Altering Tables
- 9.1 Creating Simple Tables
- 9.2 DEFAULT Values
- 9.3 Constraints (1/2)
- 9.3 Constraints (2/2)
- 9.4 Creating a Table from Tables
- 9.5 CREATE DOMAIN
- 9.6 Referential Actions: The Autopilot of Foreign Key Maintenance
- 9.7 Indexes
- 9.8 DROP TABLE
- 9.9 ALTER TABLE
- 9.10 Generated Values
- 9.11 Sequences
- 9.12 Global and Local Temporary Tables
- 9.13 Creating a Database
- 9.14 Wrap Up (1/2)
- 9.14 Wrap Up (2/2)
- Chapter 10. Views
- Chapter 11. Transactions
- Chapter 12. Database Privileges
- Chapter 13. Introduction to Cursors, Embedded SQL, Stored Procedures, and Triggers
- Index (1/2)
- Index (2/2)
Product information
- Title: SQL
- Author(s):
- Release date: July 2010
- Publisher(s): Morgan Kaufmann
- ISBN: 9780080489742
You might also like
video
SQL: Beyond the Basics
In this SQL: Beyond the Basics training course, expert author Guy Vaccaro will dive deeper into …
video
SQL Fundamentals
People today spend more and more time online, working, shopping, socializing, streaming entertainment, and doing many …
book
SQL For Dummies®
See how SQL interfaces with today's environments Start building and using relational databases with SQL's newest …
book
SQL Cookbook
You know the rudiments of the SQL query language, yet you feel you aren't taking full …