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
Hands passing a tied bakery box with a window across a doorstep, the layered cake inside still neat.

Sharing Query Results From SSMS: Copy With Headers, Grids and CSV

May 19, 2013
Pinal Dave
SQL Tips and Tricks
CSV, SQL Server, SQL Server Management Studio, sqlcmd

Share SSMS results with copy with headers, text and file output, deliberate CSV quoting, and command-line exports for larger sets.

Read More
Dark chocolate squares in an even grid on marble, one wrapped in red

Date Boundaries With DATETRUNC and EOMONTH in SQL Server 2022

May 18, 2013
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server, SQL Server 2022

Use DATETRUNC and EOMONTH for month, quarter, and week boundaries in SQL Server 2022, including index-friendly half-open filters.

Read More
Several mortar and pestle sets divide one herb batch beside a crowded single mortar

Page View Counters: Avoiding Hot Row Contention on Busy Rows

May 16, 2013
Pinal Dave
SQL Tips and Tricks
SQL Counter, SQL Lock, SQL Server

One counter row means every visitor waits in line. See how buckets spread the locks, and why rows on one page can still crowd each other.

Read More
A shuttlecock resting exactly on a court's boundary line, two rackets lying still on either side of the net.

Three-Valued Logic: TRUE, FALSE and UNKNOWN in a WHERE Clause

May 15, 2013
Pinal Dave
SQL Tips and Tricks
SQL NULL, SQL Operator, SQL Server, SQL Server 2022, SQL Sub Query

Understand three-valued logic in WHERE and CHECK, avoid NULL-poisoned NOT IN, and use SQL Server 2022 null-safe comparisons.

Read More
Gouache painting of a harbor anchor chain broken in two by a missing link, with the lone link painted red

CONCAT_NULL_YIELDS_NULL and CONCAT: How NULL Behaves in Strings

May 12, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Scripts, SQL Server

The CONCAT_NULL_YIELDS_NULL setting decides whether a string plus NULL returns NULL. The CONCAT function never looks at it and treats NULL as an empty string. This post tests both on a customer table, shows the errors the OFF setting causes, and gives safe patterns for names and numbers.

Read More
A checkout belt with three groups of groceries split by red divider bars

GO Is Not T-SQL: Batches, Variable Scope and GO With a Count

May 11, 2013
Pinal Dave
SQL Tips and Tricks
Batch, SQL Scripts, SQL Server, sqlcmd

Learn why GO is not T-SQL, how batches reset variable scope, what GO 3 repeats, and how applications should send scripts safely.

Read More
SQL SERVER - Adding Column Defaulting to Current Datetime in Table

SQL SERVER – Adding Column Defaulting to Current Datetime in Table

May 10, 2013
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts, SQL Server

How do you add a column that fills in the current datetime when a row is inserted? A sample table and a column with a default value that does it for you.

Read More
Previous 1 … 266 267 268 269 270 271 272 … 416 Next
  • Books
  • Testimonials
  • Privacy Policy

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