- Subjects
- Published
-
Hoboken, NJ :
John Wiley & Sons, Inc
[2025]
- Language
- English
- Main Author
- Other Authors
- Physical Description
- xi, 188 pages : illustrations ; 22 cm
- Bibliography
- Includes index.
- ISBN
- 9781394296941
- Introduction
- About This Book
- Foolish Assumptions
- Icons Used in This Book
- Where to Go from Here
- Chapter 1. Getting to Know SQL
- Knowing What SQL Does
- Knowing What SQL Does Not Do
- Choosing and Using an Available RDBMS Implementation
- Microsoft Access
- Microsoft SQL Server
- IBM DB2
- Oracle Database
- Sybase SQL Anywhere
- MySQL
- PostgreSQL
- Chapter 2. Creating a Database with SQL
- First Things First: Planning Your Database
- Building Tables
- Locating table rows with keys
- Using the CREATE TABLE statement
- Setting Constraints
- Column constraints
- Table constraints
- Working with Keys and Indexes
- Ensuring Data Validity with Domains
- Establishing Relationships between Tables
- Altering Table Structure
- Deleting Tables
- Chapter 3. Drilling Down to the SQL Nitty-Gritty
- SQL's Data Types
- Exact numerics
- Approximate numerics
- Character strings
- Binary strings
- Booleans
- Datetimes
- Intervals
- XML
- ROW
- Collection
- REF
- JSON
- User-defined
- Handling Null Values
- Applying Constraints
- Column constraints
- Table constraints
- Foreign key constraints
- Assertions
- Operating on Data with the Data Manipulation Language
- Retrieving data from a database
- Adding data to a table
- Updating data in a table
- Deleting data from a table
- Chapter 4. Values, Variables, Functions, and Expressions
- Entering Data Values
- Row values
- Column references
- Literal values
- Variables
- Special variables
- Working with Functions
- Summarizing data with set functions
- Dissecting data with value functions
- Using Expressions
- Numeric value expressions
- String value expressions
- Datetime value expressions
- Interval value expressions
- Boolean value expressions
- Array value expressions
- Conditional value expressions
- Converting data types with a CAST expression
- Row value expressions
- Chapter 5. SELECT Statements and Modifying Clauses
- Finding Needles in Haystacks with the SELECT Statement
- Modifying Clauses
- FROM clauses
- WHERE clauses
- GROUP BY clauses
- HAVING clauses
- ORDER BY clauses
- Chapter 6. Querying Multiple Tables with Subqueries
- Introducing Subqueries
- Subqueries that return multiple values
- Subqueries that return a single value
- Quantified subqueries: Returning a single value
- Correlated subqueries
- Using Subqueries in INSERT, DELETE, and UPDATE Statements
- Chapter 7. Querying Multiple Tables with Relational Operators
- UNION
- UNION ALL
- UNION CORRESPONDING
- INTERSECT
- EXCEPT
- JOINS
- Cartesian product or cross join
- Equi-join
- Natural join
- Condition join
- Column-name join
- Inner join
- Outer join
- ON versus WHERE
- Join Conditions and Clustering Indexes
- Chapter 8. Cursors
- Declaring a Cursor
- The query expression
- Ordering the query result set
- Updating table rows
- Sensitive versus insensitive cursors
- Scrolling a cursor
- Holding a cursor
- Declaring a result set cursor
- Opening a Cursor
- Operating on a Single Row
- FETCH syntax
- Absolute versus relative fetches
- Deleting a row
- Updating a row
- Closing a Cursor
- Chapter 9. Assigning Access Privileges
- Working with the SQL Data Control Language
- Identifying Authorized Users
- Understanding user identifiers
- Getting familiar with roles
- Classifying Users
- Granting Privileges
- Looking at data
- Deleting data
- Adding data
- Changing data
- Using certain database facilities
- Responding to an event
- Defining new data types
- Executing an SQL statement
- Doing it all
- Passing on the power
- Revoking Privileges
- Granting Roles
- Revoking Roles
- Chapter 10. Ten Retrieval Tips
- Verify the Database Structure
- Try Queries on a Test Database
- Double-Check Queries That Include Joins
- Triple-Check Queries with Subselects
- Summarize Data with GROUP BY
- Watch GROUP BY Clause Restrictions
- Use Parentheses with AND, OR, and NOT
- Control Retrieval Privileges
- Back Up Your Databases Regularly
- Handle Error Conditions Gracefully
- Index