This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
All the JOIN types at a glance as small red Venn diagrams: INNER, LEFT, RIGHT, FULL, the three IS NULL forms, and CROSS JOIN as 5 times 6

Introduction to JOINs in SQL Server: INNER, OUTER and CROSS JOIN

April 13, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Joins, SQL Scripts, SQL User Group

This introduction to JOINs shows INNER, LEFT, RIGHT, FULL and CROSS JOIN with Venn diagrams and real results from two small tables. It also covers finding rows with no match and three traps that catch people. I first wrote it for members of the Gandhinagar SQL Server User Group.

Read More
SQL SERVER - Logical Query Processing Phases - Order of Statement Execution

SQL SERVER – Logical Query Processing Phases – Order of Statement Execution

April 6, 2009
Pinal Dave
SQL Tips and Tricks
Database, Software Development, SQL Joins

Logical Query Processing is the order in which SQL Server handles each clause of a statement, with FROM and ON first and SELECT near the end. Here are the phases.

Read More
A hand lifts the last dark log from an old firewood bay into a canvas bag already holding dark logs and one pale log.

FIFO Inventory Costing in T-SQL: Matching Sales to Purchase Lots

April 1, 2009
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Joins, SQL Scripts, Temp Table

Which purchase lot paid for which sale? Two running totals and one join answer it, with no cursor and no loop.

Read More
Four places at a wooden table, with cake at two ribbon-marked cards and a hand lowering the second plate.

LEFT JOIN ON Clause: Conditions Decide Matches, Not Rows

March 15, 2009
Pinal Dave
SQL Tips and Tricks
SQL Joins, SQL NULL, SQL Scripts

Why a condition in ON keeps every customer, why a left-side condition removes nobody, and how one WHERE quietly undoes two LEFT JOINs.

Read More
Execution plan for merge join.

SQL SERVER – INNER JOIN using LEFT JOIN statement – Performance Analysis

October 25, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts

Can you write an INNER JOIN using LEFT JOIN? Yes, and the result is the same, but my performance analysis in AdventureWorks shows why you should not.

Read More
SQL SERVER - Get Common Records From Two Tables Without Using Join

SQL SERVER – Get Common Records From Two Tables Without Using Join

October 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL Joins, SQL Scripts

Sachin wanted common records from two tables without writing a join condition. Imran Mohammed shows how INTERSECT in SQL Server 2005 does it.

Read More
A painting shows a walnut cabinet with nested storage trays and three unlettered wooden keys.

Closure Table: Read and Validate Hierarchy Paths

October 17, 2008
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Index, SQL Joins

A closure table stores ancestor and descendant paths. Read those relationships efficiently and compare them with the authoritative parent edges.

Read More
Previous 1 … 11 12 13 14 15 16 17 … 22 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com