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
LEFT OUTER JOIN - WHERE NULL.

SQL SERVER – Converting Subqueries to Joins

April 23, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Performance, SQL Scripts, SQL Server

Developers often write subqueries where Joins would do, or the other way around. A short note on converting between the two, with links to my earlier examples.

Read More
SQL SERVER - Join Better Performance - LEFT JOIN or NOT IN?

SQL SERVER – Join Better Performance – LEFT JOIN or NOT IN?

April 22, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts, SQL Server

LEFT JOIN or NOT IN: which one gives Join Better Performance? It depends on the data. Compare the two queries and their execution plans on AdventureWorks.

Read More
SQL SERVER - Simple Puzzle Using Union and Union All - Answer

SQL SERVER – Simple Puzzle Using Union and Union All – Answer

March 25, 2008
Pinal Dave
SQL Puzzle
Database, SQL Joins, SQL Scripts

The answer to yesterday’s Simple Puzzle Using Union and Union All, explained with an image. My UNION vs. UNION ALL article explains why it works.

Read More
Socks sorted into matched pairs on a quilt, a small pile of odd socks set apart, a hand holding up one sock.

Solving SQL Puzzles With Set-Based Thinking

March 20, 2008
Pinal Dave
SQL Puzzle
Ranking Functions, SQL Joins, SQL Scripts, SQL Server

Set-based thinking solves three SQL puzzles with grouping, anti-joins, and windows, then turns each solution into a repeatable query habit.

Read More
SQL SERVER - 2005 - Find Nth Highest Record from Database Table - Using Ranking Function ROW_NUMBER

SQL SERVER – 2005 – Find Nth Highest Record from Database Table – Using Ranking Function ROW_NUMBER

March 12, 2008
Pinal Dave
SQL Performance
MVP, SQL Function, SQL Joins, SQL Scripts

Nicholas Paldino shared a neat way to find the Nth Highest Record from a table in SQL Server 2005 using the ranking function ROW_NUMBER. Here is his query.

Read More
SQL SERVER - How to Retrieve TOP and BOTTOM Rows Together using T-SQL - Part 3

SQL SERVER – How to Retrieve TOP and BOTTOM Rows Together using T-SQL – Part 3

March 11, 2008
Pinal Dave
SQL Performance
SQL Function, SQL Joins, SQL Scripts

Part 3 on how to retrieve TOP and BOTTOM rows together: Dave Arthur’s solution uses UNION ALL instead of an OR clause, and it is quite good.

Read More
A blue maze to represent a SQL problem.

SQL SERVER – How to Retrieve TOP and BOTTOM Rows Together using T-SQL – Part 2 – CTE

March 10, 2008
Pinal Dave
SQL Tips and Tricks
CTE, SQL Function, SQL Joins, SQL Scripts, SQL Server

Part 2 of retrieving TOP and BOTTOM rows together: a reader’s solution using a CTE, the temporary result set introduced in SQL Server 2005.

Read More
Previous 1 … 13 14 15 16 17 18 19 … 21 Next
  • Books
  • Testimonials
  • Privacy Policy

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