SQL

Creating Pivot Tables

Creating Pivot Tables

Pivot tables are incredibly useful when writing certain types of SQL queries, because they let you generate rows that do not otherwise exist. Here are several ways to create them. (There is also a CONNECT BY approach that is well-known on the Internet, but that I have never gone back and added to this article). 

An Incremental Approach to Developing SQL Queries

An Incremental Approach to Developing SQL Queries

The key to getting accurate information from your database is to write good SELECT statements. In fact, it's the key to just about everything you do with your data. Even the tasks of updating and deleting data depend on your ability to select the relevant data in the first place. Because selecting the correct data is the foundation for much of what you do with your database, it's worth taking some time to think about how you write SELECT statements.