Read this book for free at sqlrun.com. This book teaches newcomers SQL, the language of databases, and includes examples and syntax for the most widely used database systems. In all its editions, this book has sold more than 150,000 copies and is popular with end users, students, data scientists, statisticians, epidemiologists, analysts, app developers, webmasters, and hobbyists. Thorough cross-referencing makes it a useful desktop reference for experienced SQL programmers. In SQL Run, the author has consolidated and updated his earlier SQL titles in a single book.
- Covers Oracle Database, Microsoft SQL Server, IBM Db2 Database, MySQL, PostgreSQL, Microsoft Access, and Standard SQL (ISO/IEC).
- Hundreds of examples of varied difficulty encourage you to experiment and explore.
- Download the sample database and SQL source code to follow along with the examples.
- Organize your database in terms of the relational model.
- Master tables, columns, rows, and keys.
- Retrieve, filter, sort, and format data.
- Use functions and operators to transform and summarize data.
- Answer hard questions by using joins, subqueries, constraints, conditional logic, and metadata.
- Create, alter, and drop tables, indexes, and views.
- Insert, update, delete, and merge data.
- Execute transactions to maintain the integrity of your data.
- Avoid common pitfalls involving nulls.
- Troubleshoot and optimize queries.
- Learn advanced techniques that extend the power of SQL.
1. Running SQL Programs
2. The Relational Model
3. SQL Basics
4. Retrieving Data from a Table
5. Operators and Functions
6. Summarizing and Grouping Data
9. Set Operations
10. Inserting, Updating, and Deleting Rows
11. Creating, Altering, and Dropping Tables
15. Advanced SQL
About the Author
Chris Fehily is a statistician and author living in Carmel, California.