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 database character beside a stopwatch

T-SQL Errors and Reactions Demo: SQL in Sixty Seconds #005

March 7, 2012
Pinal Dave
SQL Video
SQL Error Messages, SQL in Sixty Seconds, SQL Scripts

This T-SQL errors and reactions demo follows episode #002 with queries you can run. It shows what a CATCH block can read, how severity is stored, how to log a failure and keep going, and why THROW keeps the original error while RAISERROR replaces it.

Read More
Gouache painting of a database character beside a stopwatch

Leap Year in SQL Server: SQL in Sixty Seconds #004

February 29, 2012
Pinal Dave
SQL Video
SQL DateTime, SQL Function, SQL in Sixty Seconds, SQL Scripts

To find a leap year in SQL Server, ask EOMONTH for the last day of February. I tested the method against the divisibility rule for every year from 1 to 9999 and found no disagreement. The post also shows an inline function, the errors for invalid years and a one-line TRY_CONVERT test.

Read More
Gouache painting of a stone moving from an open envelope into a fitted compartment in a wooden sorting tray.

Declare and Initialize Variables in SQL Server: SQL in Sixty Seconds #003

February 22, 2012
Pinal Dave
SQL Video
SQL Datatype, SQL in Sixty Seconds, SQL Scripts, SQL Variable

To declare and initialize variables in one statement, give each variable a type and a starting value in the same DECLARE. The tests here show the NULL default, a loop that does not reset an uninitialized variable, and the one character varchar trap on SQL Server 2025.

Read More
Gouache painting of document cards following a branching wooden track, with one queue blocked by a red barrier and another reaching an output drawer.

T-SQL Errors and Reactions in SQL Server: SQL in Sixty Seconds #002

February 15, 2012
Pinal Dave
SQL Video
SQL Error Messages, SQL in Sixty Seconds, SQL Scripts, SQL Transactions

T-SQL errors and reactions are the subject of this early SQL in Sixty Seconds episode with Rick Morelan. The tests here show which errors stop one statement, which stop the whole batch, and how XACT_ABORT, TRY CATCH and THROW change the reaction.

Read More
Gouache painting of a database character beside a stopwatch

Convert Subquery to CTE: SQL in Sixty Seconds #001

February 8, 2012
Pinal Dave
SQL Video
CTE, SQL in Sixty Seconds, SQL Scripts, SQL Sub Query

You can convert subquery to CTE syntax by naming the inner query and using that name in the outer query. The first SQL in Sixty Seconds episode shows the change. My tests on SQL Server 2025 show the result stays the same, and that a CTE used twice reads the table twice.

Read More
SQL SERVER - A Quick Trick about SQL Server CONCAT function

SQL SERVER – A Quick Trick about SQL Server CONCAT function

December 20, 2011
Pinal Dave
SQL Video
SQL Function, SQL Scripts, SQL Server, SQLAuthority Book Review

A quick trick from a Virtual Tech Days demo: adding a string to GETDATE() throws an error. CAST fixes it, and SQL Server 2012 CONCAT does it more simply.

Read More
Curved wooden reading nook with books.

SQLAuthority News – Uncut and Unedited – Interview of Pinal Dave on Book Authoring

September 15, 2011
Pinal Dave
SQL Video
Joes 2 Pros, SQL Wait Stats

I was very happy when books were published and I got a print copy in my hand. In this blog post we will discuss about Book Authoring.

Read More
Previous 1 … 22 23 24 25 26 Next
  • Books
  • Testimonials
  • Privacy Policy

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