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
Aug6

Multi-Row INSERT in SQL Server: One Statement, All or Nothing

Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Server, SQL Table Operation, SQL Transactions
1 Comment

A multi-row INSERT adds several rows with one statement, using a list of value groups separated by commas. This post compares it with separate INSERT statements on a small table of books. It shows that one bad row undoes the whole statement, and it covers the errors and the 1,000 row limit.

Continue Reading
Aug5

Unmatched Records Query: Four Ways to Find Rows With No Match

Pinal Dave
SQL Tips and Tricks
SQL Joins, SQL NULL, SQL Scripts, SQL Sub Query
2 Comments

An unmatched records query finds the rows in one table that have no partner in another, such as plants that never sold. This post runs four versions on a small table: LEFT JOIN with a NULL test, NOT EXISTS, NOT IN and EXCEPT. It also shows the NULL trap that makes NOT IN return nothing.

Continue Reading
Aug4

Build a Query in Two Phases: Organize First, Itemize Second

Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Coding Standards, SQL Joins, SQL Scripts
8 Comments

Build a query in two phases: organize first, itemize second. Phase one gets the tables, joins and filter working with SELECT *, and phase two swaps the star for a column list. This post shows the method on a small branch and staff table, and the three errors it helps you avoid.

Continue Reading
Aug3

Finding Apostrophes in SQL Server Text: Straight and Curly

Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Search, SQL String, Unicode
3 Comments

Finding apostrophes in SQL Server text takes one trick and one trap. The trick is doubling the quote inside a LIKE pattern. The trap is that text can hold a curly apostrophe, and the usual search skips it. This post tests both on a table of eight shop names.

Continue Reading
Aug2

Special Characters in a LIKE Pattern: Which Ones Are Wildcards

Pinal Dave
SQL Tips and Tricks
SQL Operator, SQL Scripts, SQL Search, SQL String
4 Comments

Special characters in a LIKE pattern can match the wrong rows, because three symbols mean more than themselves. This post tests every common symbol on one small table. It shows how to search for a percent sign, an underscore and a bracket, and why a space in the pattern counts.

Continue Reading
Aug1

Wildcard Basics in SQL Server: How LIKE Patterns Work

Pinal Dave
SQL Tips and Tricks
SQL Operator, SQL Scripts, SQL Search, SQL String
10 Comments

Wildcard basics for SQL Server: how LIKE works with %, _, sets and ranges, shown on one small table of last names. It also covers the mistakes with equal signs and sets, case and accents in ranges, and matching a wildcard literally. Every result comes from SQL Server 2025.

Continue Reading
Aug1

Large IN Lists: When a Temp Table Beats Thousands of Values

Pinal Dave
SQL Tips and Tricks
Primary Key, SQL Performance, SQL Sub Query, Temp Table
No Comments

Pasting thousands of IDs into an IN list works, until it does not. See where the time goes and how to keep the answer the same with a temp table.

Continue Reading
Previous 1 … 585 586 587 588 589 590 591 … 847 Next

SQL Server slow? Let's fix it together in about four hours.

Pinal Dave

In my Comprehensive Database Performance Health Check, you share your screen, I guide you, and we fix your biggest performance troublemakers. No passwords. No remote access.

You keep every script, and the know-how to fix it yourself next time.

Want your whole team to learn it?

My Practical Workshop has no PowerPoint, just live demos. My AI Enablement Workshop shows your team where AI saves hours, and where it quietly costs them.

Over 400 customers have worked with me this way, and not one shared a password. See all consulting options.


Who We Are

Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 24 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.

Pinal has authored 19 books and 125 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,800 database tech articles on his blog at https://blog.sqlauthority.com.

Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).


Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long-term multi-channel campaigns to drive leads for their sales pipeline.


Shaivi Pinalkumar Dave is a book author and a women’s artistic gymnast.

  • Books
  • Testimonials
  • Privacy Policy

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