Sams Teach Yourself SQL in 10 Minutes, Fourth Edition
New full-color code examples help you see how SQL statements are structured
Whether you're an application developer, database administrator, web application designer, mobile app developer, or Microsoft Office users, a good working knowledge of SQL is an important part of interacting with databases. And Sams Teach Yourself SQL in 10 Minutes offers the straightforward, practical answers you need to help you do your job.
Expert trainer and popular author Ben Forta teaches you just the parts of SQL you need to know–starting with simple data retrieval and quickly going on to more complex topics including the use of joins, subqueries, stored procedures, cursors, triggers, and table constraints.
You'll learn methodically, systematically, and simply–in 22 short, quick lessons that will each take only 10 minutes or less to complete.
With the Fourth Edition of this worldwide bestseller, the book has been thoroughly updated, expanded, and improved. Lessons now cover the latest versions of IBM DB2, Microsoft Access, Microsoft SQL Server, MySQL, Oracle, PostgreSQL, SQLite, MariaDB, and Apache Open Office Base. And new full-color SQL code listings help the beginner clearly see the elements and structure of the language.
Use the major SQL statements Construct complex SQL statements using multiple clauses and operators Retrieve, sort, and format database contents Pinpoint the data you need using a variety of filtering techniques Use aggregate functions to summarize data Join two or more related tables Insert, update, and delete data Create and alter database tables Work with views, stored procedures, and more Table of Contents
2 Retrieving Data
4 Filtering Data
5 Advanced Data Filtering
6 Using Wildcard Filtering
7 Creating Calculated Fields
8 Using Data Manipulation Functions
9 Summarizing Data
10 Grouping Data
11 Working with Subqueries
12 Joining Tables
13 Creating Advanced Joins
14 Combining Queries
15 Inserting Data
16 Updating and Deleting Data
17 Creating and Manipulating Tables
18 Using Views
19 Working with Stored Procedures
20 Managing Transaction Processing
21 Using Cursors
22 Understanding Advanced SQL Features
Appendix A: Sample Table Scripts
Appendix B: Working in Popular Applications
Appendix C : SQL Statement Syntax
Appendix E: SQL Reserved Words
- Covers Oracle, Microsoft SQL Server, IBM DB2, MySQL, PostgreSQL, and Microsoft Access.
- Learn the core language for standard SQL, and variations for the most widely used database systems.
- Organize your database in terms of the relational model.
- Master tables, columns, rows, and keys.
- Retrieve, sort, and format data.- Filter the data that you don't want to see.
- Convert and manipulate data with SQL's built-in functions and operators.
- Use aggregate functions to summarize data.
- Create complex SQL statements 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.
- Plenty of tips, tricks, and timesavers.
- Fully cross-referenced, linked, and searchable.
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
Let's face it, SQL is a deceptively simple language to learn, and many database developers never go far beyond the simple statement: SELECT columns FROM table WHERE conditions. But there is so much more you can do with the language. In the SQL Cookbook, experienced SQL developer Anthony Molinaro shares his favorite SQL techniques and features. You'll learn about:
Written in O'Reilly's popular Problem/Solution/Discussion style, the SQL Cookbook is sure to please. Anthony's credo is: "When it comes down to it, we all go to work, we all have bills to pay, and we all want to go home at a reasonable time and enjoy what's still available of our days." The SQL Cookbook moves quickly from problem to solution, saving you time each step of the way.