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
A garden kneeler with new side handles beside an old muddy folded sack, a red trowel on its pad

CURRENT_DATE, || and Other Small T-SQL Changes in SQL Server 2025

November 11, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Server, SQL String

Use CURRENT_DATE, string concatenation, optional SUBSTRING length and bigint DATEADD in SQL Server 2025 with clear examples and checks.

Read More
SQL SERVER - Recycle Error Log - Create New Log file without Server Restart

SQL SERVER – Recycle Error Log – Create New Log file without Server Restart

November 9, 2010
Pinal Dave
SQL Interview Questions and Answers
SQL Error Messages, SQL Scripts, SQL Server

A client’s DBA restarted the server just to start a fresh Error Log. There is no need: you can recycle the log and create a new file without a restart.

Read More
An old spinning wheel taken apart and laid out on a workshop floor in rows from largest part to smallest.

A Bill of Materials With a Recursive CTE

November 8, 2010
Pinal Dave
SQL Tips and Tricks
CTE, SQL Scripts, SQL Server

Expand a bill of materials with a recursive CTE, multiply quantities across levels, trace component paths, and guard against cycles.

Read More
A row of bean jars on a shelf, one jar with a single extra red bean on top

Leap Years in T-SQL: February 29 and Date Math

November 5, 2010
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

Handle leap years in T-SQL with date functions, test February boundaries, and choose a clear anniversary rule for February 29 births.

Read More
An open protected archive case sits before shelves of closed cases ready for inspection.

SQL SERVER – Finding Last Backup Time for All Database

November 4, 2010
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL DMV, SQL Scripts, SQL Server

Last Backup Time comes from recorded history, which I check by backup type. Recovery still needs the files and a tested chain.

Read More
A small basket of green apples sits before larger baskets filled with apples and pears.

COUNT OVER: Show the Filtered Total Beside Page Rows

November 2, 2010
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Order By, SQL Scripts, SQL Server

COUNT OVER helps me keep a page’s row count separate from the filtered total. Compare full and partial pages. An empty page needs an explicit total-count contract.

Read More
Gouache painting of a shelf of cloth-bound books with one book tilted out of the row and a vermilion ribbon bookmark hanging below it

Find the Last Read and Write Time of Every Table in SQL Server

October 31, 2010
Pinal Dave
SQL Tips and Tricks
SQL DMV, SQL Index, SQL Scripts, SQL Server

Find the last read and write time of every table in SQL Server with sys.dm_db_index_usage_stats. The tests show what counts as a read, why an insert counts as a write, what an index rebuild does to the numbers, and what wipes them.

Read More
Previous 1 … 329 330 331 332 333 334 335 … 420 Next
  • Books
  • Testimonials
  • Privacy Policy

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