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
UNION result with all rows.

SQL SERVER – Introduction and Example of UNION and UNION ALL

October 15, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts, SQL Union clause

A simple example of UNION and UNION ALL with two table variables. UNION removes the duplicate rows, while UNION ALL keeps every row from both tables.

Read More
SQL SERVER - Three Rules to Use UNION

SQL SERVER – Three Rules to Use UNION

October 14, 2007
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts, SQL Union clause

The three rules to use UNION from Ben Forta’s T-SQL book: two or more SELECT statements, the same columns in the same order, and compatible data types.

Read More
Five small carts each carrying one crate, beside one cart carrying all five together.

SQL SERVER – Insert Multiple Records Using One Insert Statement – Use of UNION ALL

June 8, 2007
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Scripts, SQL Server, SQL Union clause

Insert multiple records with one INSERT statement by combining SELECT and UNION ALL, instead of a separate INSERT for every row. SQL Server 2008 has a newer way.

Read More
Previous 1 2 3 4
  • Books
  • Testimonials
  • Privacy Policy

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