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 shepherd seen from behind counting sheep one by one through a half-open field gate, a red crook against the post.

ROWCOUNT_BIG and @@ROWCOUNT: Checking What a Statement Changed

September 25, 2019
Pinal Dave
SQL Tips and Tricks
Output Clause, SQL Function, SQL Scripts, SQL Server, SQL Trigger

Capture ROWCOUNT_BIG immediately after a change, validate expected counts, and handle NOCOUNT, triggers, and MERGE without stale values.

Read More
Gouache painting of three differently shaped tea cups on a bamboo tray beside a slate blue teapot, the small one vermilion

PRINT Date Format in SQL Server: PRINT Versus SELECT

August 23, 2019
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL String

The PRINT date format differs from the SELECT format, because PRINT converts the value to text first. This post tests PRINT with six date and time types, shows why joining text and a datetime fails with Msg 241, shows how the session language changes the month name, and gives the formats that stay the same everywhere.

Read More
Gouache painting of a small tower of round, square and triangular wooden blocks topped with a vermilion block

DATETIMEFROMPARTS Function: Build Dates From Parts

August 17, 2019
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

The DATETIMEFROMPARTS function builds a datetime value from seven numbers, with no string conversion and no language trap. This post tests how it rounds milliseconds, which parts raise an error, how it treats NULL, and how its relatives build dates, times and offsets.

Read More
The first group of towels is set aside while the remaining sequence stays on its shelf

How to Skip Top N Rows in SQL Server? – Interview Question of the Week #237

August 11, 2019
Pinal Dave
SQL Interview Questions and Answers
Ranking Functions, SQL Function, SQL Paging, SQL Scripts, SQL Server

Question: How to skip top N Rows in SQL Server and retrieve the rest of the rows? Answer: I had asked the above question in one of the interviews last week.

Read More
An opened pea pod lies beside its unwrapped peas

How to Remove Quotes of QUOTENAME? – Interview Question of the Week #235

July 28, 2019
Pinal Dave
SQL Interview Questions and Answers
SQL Function, SQL Scripts, SQL Server, SQL String

Question: How to Remove Quotes of QUOTENAME? I received based on my yesterday’s blog post SQL SERVER – QUOTENAME Function and Custom Quote Character.

Read More
Gouache painting of wooden frames in different shapes each holding a pebble, with the diamond frame in vermilion

QUOTENAME Function: Custom Quote Characters and Dynamic SQL

July 27, 2019
Pinal Dave
SQL Tips and Tricks
Dynamic SQL, SQL Function, SQL Scripts, SQL String

The QUOTENAME function turns a name into a safe identifier and doubles any closing delimiter inside it. Tested queries show which quote characters work, the 128 character limit and a dynamic SQL example. A short card lists the rules.

Read More
Loose tiles are combined into a finished tiled surface

How to Find Definition of Computed Column in SQL Server using T-SQL? – Interview Question of the Week #233

July 14, 2019
Pinal Dave
SQL Interview Questions and Answers
Computed Column, SQL Function, SQL Server, SQL System Table

Question: How to Find Definition of Computed Column in SQL Server using T-SQL?
Answer: A very fair question, I received the other day.

Read More
Previous 1 … 7 8 9 10 11 12 13 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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