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
SQL SERVER - EXCEPT Clause in SQL Server is Similar to MINUS Clause in Oracle

SQL SERVER – EXCEPT Clause in SQL Server is Similar to MINUS Clause in Oracle

August 7, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts

Is there a MINUS clause in SQL Server like in Oracle? Yes, EXCEPT returns the rows of the first query that are not in the second. Example included.

Read More
SQL Server query window showing query execution.

SQL SERVER – 2005 – Difference Between INTERSECT and INNER JOIN – INTERSECT vs. INNER JOIN

August 3, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts

What is the difference between INTERSECT and INNER JOIN? Both can return common rows, and AdventureWorks examples show how the two compare.

Read More
SQL server query results.

SQL SERVER – Effect of Order of Join In Query

August 2, 2008
Pinal Dave
SQL Performance
SQL Index, SQL Joins, SQL Scripts, SQL Server

Does the order of join in a query change the result? With AdventureWorks, I show two queries that return the same rows, only in a different order.

Read More
SQL SERVER - SQL SERVER - Simple Example of Recursive CTE - Part 2 - MAXRECURSION - Prevent CTE Infinite Loop

SQL SERVER – SQL SERVER – Simple Example of Recursive CTE – Part 2 – MAXRECURSION – Prevent CTE Infinite Loop

July 29, 2008
Pinal Dave
SQL Tips and Tricks
CTE, SQL Joins, SQL Scripts

Can you stop a recursive CTE from running forever? Yes. Use the MAXRECURSION option to limit it, and see what happens when the limit is too low.

Read More
SQL SERVER - Simple Example of Recursive CTE

SQL SERVER – Simple Example of Recursive CTE

July 28, 2008
Pinal Dave
SQL Tips and Tricks
CTE, SQL Joins, SQL Scripts

A simple example of Recursive CTE in SQL Server, using AdventureWorks to walk the hierarchy of managers and employees, with each part explained.

Read More
SQL SERVER - PIVOT and UNPIVOT Table Examples

SQL SERVER – PIVOT and UNPIVOT Table Examples

June 7, 2008
Pinal Dave
SQL Tips and Tricks
PIVOT and UNPIVOT, SQL Joins, SQL Scripts

If you PIVOT a table and then UNPIVOT it, do you get the original back? Not always. My PIVOT and UNPIVOT table examples show why aggregation loses data.

Read More
SQL SERVER - Order Of Column In Index

SQL SERVER – Order Of Column In Index

June 2, 2008
Pinal Dave
SQL Performance
SQL Index, SQL Joins, SQL Scripts

Adding more columns does not make an index better. The order of column in index matters most, since an index is used only when its first column is in the query.

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

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