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
Gouache painting of a cream ribbon running off a counter edge beside a tidy roll of wound cream and vermilion ribbon

Word Wrap in SSMS: Wrap Long Lines of T-SQL

November 13, 2020
Pinal Dave
SQL Tips and Tricks
SQL Server, SQL Server Configuration, SQL Server Management Studio

Word wrap in SSMS folds a long line of T-SQL at the edge of the window, so you read it without scrolling sideways. This post shows where to turn it on for every window, how to show the wrap marks, how to switch it for one window, and why it never changes your script.

Read More
Distinct tile selection remains separate from a deliberate alignment jig.

SQL SERVER – DISTINCT Does Not Guarantee ORDER BY

November 5, 2020
Pinal Dave
SQL Tips and Tricks
Execution Plan, SQL Operator, SQL Order By, SQL Scripts, SQL Server

DISTINCT removes duplicate result rows without guaranteeing their order. My original claim that it always sorts output was incorrect.

Read More
Gouache painting of a seedling in a clay pot beside a glass bell jar covering a lit candle

DDL in a Transaction: What Rolls Back and What Blocks

November 3, 2020
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Transactions, Transaction Isolation

DDL in a transaction works in SQL Server: CREATE, ALTER and DROP roll back like any other change. This post proves it with a small demo, lists the statements that are refused inside a transaction, and shows which locks an open DDL transaction holds and who has to wait for them.

Read More
A hand carrying three drinks and a plate on one wooden tray across a cafe terrace, worn gravel paths behind.

Rewriting Correlated Subqueries as Window Functions

October 31, 2020
Pinal Dave
SQL Tips and Tricks
Ranking Functions, SQL Function, SQL Performance, SQL Server, SQL Sub Query

Replace correlated subqueries with windowed counts, dates, and running totals, preserve detail rows, and keep useful EXISTS filters.

Read More
Title card: Error 8632: Expression Services Limit Reached

SQL SERVER – Fix Error 8632 – Internal Error: An expression Services Limit Has Been Reached

October 29, 2020
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Server, SQL Upgrade

When we tried to run a few of their stored procedure. How we can fix Error 8632 – Internal Error: An expression Services Limit Has Been Reached.

Read More
Gouache painting of three padlocks on a bench, each with a vermilion key in it

Check Constraint on Identity Column: Why Inserts Fail

October 24, 2020
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Identity, SQL Scripts

A check constraint on identity column values can make every insert fail, because the identity moves on whether or not the row is accepted. This post reproduces the failure, shows that the failed attempts still use up identity values, and lists every such constraint in a database with one query.

Read More
Gouache painting of three fruit bowls in a row where two hold pears and the middle one is empty and vermilion

Add Columns With NULL in SQL Server: ISNULL, COALESCE or SUM

October 19, 2020
Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Operator, SQL Scripts

To add columns with NULL in SQL Server, first decide what an empty value means. This post sums three nullable columns with the plus operator, ISNULL, COALESCE and SUM, shows where each one differs on a row of all NULLs, and compares their CPU cost on two million rows.

Read More
Previous 1 … 42 43 44 45 46 47 48 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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