Introduction Organization of This Book Feedback Needed! Conventions Acknowledgments Example Data CASE Expressions Simple CASE Expressions Searched CASE Expressions Datatype Conversions ANSI/ISO CAST Function ANSI/ISO EXTRACT Function Datetime Conversions (Oracle) Numeric Conversions (Oracle) Miscellaneous Conversions (Oracle) Datetime Conversions (DB2) Numeric Conversions (DB2) Miscellaneous Conversions (DB2) Datetime Conversions (SQL Server) Numeric Conversions (SQL Server) Miscellaneous Conversions (SQL Server) Datetime Conversions (MySQL) Numeric Conversions (MySQL) Deleting Data Deleting All Rows Deleting from Views and Subqueries Deleting from Partitions (Oracle) Returning the Deleted Data (Oracle) Double-FROM (SQL Server) Flashback Queries (Oracle) Functions Date Functions Numeric and Math Functions Trigonometric Functions String Functions Miscellaneous Functions (Oracle) Grouping and Summarizing Aggregate Functions GROUP BY Useful GROUP BY Techniques HAVING GROUP BY Extensions (Oracle) GROUP BY Extensions (SQL Server) Hierarchical Queries Recursive WITH (ANSI/ISO) CONNECT BY Syntax (Oracle) Inserting Data Single-Row Inserts Insert Targets Subquery Inserts Direct-Path Inserts (Oracle) RETURNing Inserted Values (Oracle) Multi-Table Inserts (Oracle) Joining Tables The Concept of a Join Cross Joins Inner Joins Non-Equi-Joins Outer Joins Literals Text Literals Numeric Literals Datetime Literals Datetime Interval Literals Merging Data NULLs Predicates for NULLs Using CASE with NULLs Oracle Functions for NULLs DB2 Functions for NULLs SQL Server Functions for NULLs MySQL Functions for NULLs Predicates Group Comparison Predicates Multiple Values on the Left (Oracle) EXISTS Predicates IN Predicates BETWEEN Predicates LIKE Predicates Recursive Queries Regular Expressions Oracle Regular Expressions SQL Server Regular Expressions MySQL Regular Expressions Selecting Data The SELECT Clause ALL and DISTINCT The FROM Clause The WHERE Clause The GROUP BY Clause The HAVING Clause The ORDER BY Clause Subqueries The WITH Clause WITH with Correlated Subqueries Transaction Management Autocommit Mode Starting a Transaction Ending a Transaction Aborting a Transaction Aborting to a Transaction Savepoint Union Queries UNION and UNION ALL Order of Evaluation EXCEPT (or MINUS) INTERSECT Updating Data Simple Updates New Values from a Subquery Updating Through a Cursor (DB2 and SQL Server) Updating Views and Subqueries Updating a Partition (Oracle) Returning the Updated Data (Oracle) UPDATE FROM Clause (SQL Server).
SQL Pocket Guide