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
Two twin lambs in a field, a hand parting the wool on one to reveal a small red mark

Comparing Two Copies of a Table With CHECKSUM_AGG and HASHBYTES

June 24, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Migration, SQL Scripts, SQL Server

Use CHECKSUM_AGG for a quick table-copy signal, then compare canonical HASHBYTES values and key ranges to locate real data differences.

Read More
An open pea pod with five peas and an empty stretch at the end beside a red bowl.

LEN vs DATALENGTH: Trailing Spaces, Unicode Bytes and NULL

June 22, 2013
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Server, SQL String, Unicode

Compare LEN vs DATALENGTH for trailing spaces, Unicode, UTF-8, NULL, and MAX values before safely resizing SQL Server string columns.

Read More
Two hourglasses, one dropping coarse pebbles and one pouring fine sand, the fine one on a red base

GETDATE vs SYSDATETIME: Precision of the Current Time

June 20, 2013
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL DateTime, SQL Function, SQL Server

Compare SYSDATETIME with GETDATE and UTC time functions, understand datetime rounding, and choose a clear timestamp type and clock contract.

Read More
A swing-arm towel rail with some arms swung out holding towels and others folded flat, one red towel.

Bit Functions in SQL Server 2022: BIT_COUNT, GET_BIT and LEFT_SHIFT

June 19, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Operator, SQL Server, SQL Server 2022

Use BIT_COUNT and SQL Server 2022 bit functions to read, set, count, and shift flags, while choosing clear storage for ordinary settings.

Read More
Steel calipers gripping the widest of three turned wooden spindles on a workbench scattered with shavings.

GREATEST, LEAST and Other Small Helpers

June 10, 2013
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL NULL, SQL Server, SQL Server 2022

GREATEST, LEAST, and recent T-SQL helpers replace bulky CASE patterns while preserving explicit rules for NULL and data types.

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
SQL Server query window.

SQL SERVER – Solution to Puzzle – REPLICATE over 8000 Characters

May 17, 2013
Pinal Dave
SQL Puzzle
SQL Function

Here is the answer to my puzzle on REPLICATE over 8000 characters, with a quick recap of the script and why the lengths come out the way they do.

Read More
Previous 1 … 27 28 29 30 31 32 33 … 62 Next
  • Books
  • Testimonials
  • Privacy Policy

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