Joe Celko's SQL for Smarties: Advanced SQL ProgrammingSQL for Smarties was hailed as the first book devoted explicitly to the advanced techniques needed to transform an experienced SQL programmer into an expert. Now, 10 years later and in the third edition, this classic still reigns supreme as the book written by an SQL master that teaches future SQL masters. These are not just tips and techniques; Joe also offers the best solutions to old and new challenges and conveys the way you need to think in order to get the most out of SQL programming efforts for both correctness and performance. In the third edition, Joe features new examples and updates to SQL-99, expanded sections of Query techniques, and a new section on schema design, with the same war-story teaching style that made the first and second editions of this book classics. - Expert advice from a noted SQL authority and award-winning columnist, who has given ten years of service to the ANSI SQL standards committee and many more years of dependable help to readers of online forums. - Teaches scores of advanced techniques that can be used with any product, in any SQL environment, whether it is an SQL-92 or SQL-99 environment. - Offers tips for working around system deficiencies. - Continues to use war stories--updated!--that give insights into real-world SQL programming challenges. |
Contents
| 1 | |
| 61 | |
3 Numeric Data in SQL | 101 |
4 Temporal Data Types in SQL | 119 |
5 Character Data Types in SQL | 169 |
Missing Data in SQL | 185 |
7 Multiple Column Data Elements | 201 |
8 Table Operations | 211 |
20 Grouping Operations | 425 |
21 Aggregate Functions | 439 |
22 Auxiliary Tables | 477 |
23 Statistics in SQL | 509 |
24 Regions Runs Gaps Sequences and Series | 549 |
25 Arrays in SQL | 575 |
26 Set Operations | 591 |
27 Subsets | 605 |
9 Comparison or Theta Operators | 235 |
10 Valued Predicates | 241 |
11 CASE Expressions | 247 |
12 LIKE Predicate | 261 |
13 BETWEEN and OVERLAPS Predicates | 273 |
14 The NOT IN Predicate | 287 |
15 EXISTS Predicate | 299 |
16 Quantified Subquery Predicates | 309 |
17 The SELECT Statement | 317 |
18 VIEWs Derived Tables Materialized Tables and Temporary Tables | 369 |
19 Partitioning Data in Queries | 401 |
28 Trees and Hierarchies in SQL | 623 |
29 Temporal Queries | 641 |
30 Graphs in SQL | 681 |
31 OLAP in SQL | 709 |
32 Transactions and Concurrency Control | 719 |
33 Optimizing SQL | 731 |
| 761 | |
| 777 | |
About the Author | 810 |
Other editions - View all
Common terms and phrases
A.nbr adjacency list aggregate functions algorithm arrival_town base table Celko character column names constraint CREATE TABLE CREATE VIEW CROSS JOIN crosstab CURRENT_DATE cursor data type data warehouse database datetime DECLARE DEFAULT defined DELETE derived table digits Dorothy Gale duplicates employee empty set end_date example EXISTS SELECT flight Foobar FOREIGN KEY from_date GROUP BY clause INNER JOIN INSERT INTEGER NOT NULL interval Joe Celko keycol LEFT OUTER JOIN look lot_id match median node nonsequenced NULL END NULL NULL NULL PRIMARY KEY OLAP operators optimizer option OUTER JOIN P1.weight Personnel AS P1 pilot predicate problem query referential integrity result set room_nbr rule scalar schema SELECT COUNT SELECT DISTINCT SELECT statement seq_nbr sequence sort Soundex SQL implementations SQL products Standard SQL start_date string subset syntax temporary table timestamp to_date transaction trick unique value expression vendor zero
Popular passages
Page ii - Relational Databases: From Conceptual Analysis to Logical Design Terry Halpin Component Database Systems Edited by Klaus R. Dittrich and Andreas Geppert Managing Reference Data in Enterprise Databases: Binding Corporate Data to the Wider World Malcolm Chisholm Data Mining: Concepts and Techniques Jiawei Han and Micheline Kamber Understanding SQL and Java Together: A Guide to SQL], JDBC, and Related Technologies Jim Melton and Andrew Eisenberg Database: Principles, Programming, and Performance, Second...
Page iii - Edited by Francois Bancilhon, Claude Delobel, and Paris Kanellakis Database Transaction Models for Advanced Applications • Edited by Ahmed K. Elmagarmid A Guide to Developing Client/Server SQL Applications • Setrag Khoshafian, Arvola Chan, Anna Wong, and Harry KT Wong The Benchmark Handbook for Database and Transaction Processing Systems, Second Edition • Edited by Jim Gray Camelot and Avalon: A Distributed Transaction Facility • Edited by Jeffrey L. Eppinger, Lily B. Mummert, and Alfred...
Page iii - Technology Cynthia Maro Saracco Readings in Database Systems, Third Edition Edited by Michael Stonebraker and Joseph M. Hellerstein Understanding SQL's Stored Procedures: A Complete Guide to SQL/PSM Jim Melton Principles of Multimedia Database Systems VS Subrahmanian Principles of Database Query Processing for Advanced Applications Clement T. Yu and Weiyi Meng Advanced Database Systems Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, VS Subrahmanian, and Roberto Zicari Principles...
Page iii - Management of Heterogeneous and Autonomous Database Systems, Edited by Ahmed Elmagarmid, Marek Rusinkiewicz, and Amit Sheth Object-Relational DBMSs: Tracking the Next Great Wave, Second Edition, Michael Stonebraker and Paul Brown, with Dorothy Moore A Complete Guide to DB2 Universal Database, Don Chamberlin Universal Database Management: A Guide to Object/Relational Technology, Cynthia Maro Saracco Readings in Database Systems, Third Edition, Edited by Michael Stonebraker and Joseph M.
Page ii - Philippe Rigaux, Michel Scholl, and Agnes Voisard Information Modeling and Relational Databases: From Conceptual Analysis to Logical Design Terry Halpin Component Database Systems Edited by Klaus R. Dittrich and Andreas Geppert Managing Reference Data in Enterprise Databases: Binding Corporate...
Page i - The Morgan Kaufmann Series in Data Management Systems Series Editor: Jim Gray, Microsoft Research...
Page 63 - Language). 6. The view updating rule: All views that are theoretically updatable must be updatable by the system.


