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 long wooden fence across a meadow with one red post marking the boundary between two fields.

Date Functions Quiz: What Does DATEDIFF Count?

January 28, 2012
Pinal Dave
SQL Puzzle
SQL Datatype, SQL DateTime, SQL Function

This Date Functions Quiz asks what DATEDIFF returns for two dates one day apart, when the unit is year. The answer is 1, because DATEDIFF counts boundaries crossed. A tested script shows an age calculation that works, plus DATETRUNC and EOMONTH.

Read More
A set of nested wooden boxes opened on a table, the smallest innermost box painted red.

XML Data Type Quiz: Which Method Returns a Plain Value?

January 21, 2012
Pinal Dave
SQL Puzzle
SQL Datatype, SQL Function, SQL XML

This XML Data Type Quiz asks which xml method returns the customer name as an ordinary SQL value with a type you choose. The answer is value(). A tested script runs the methods on one order document and shows what each one returns.

Read More
A small wooden podium on a plain floor with red ribbons laid across the top step.

Ranking Functions Quiz: ROW_NUMBER, RANK or DENSE_RANK?

January 9, 2012
Pinal Dave
SQL Puzzle
Ranking Functions, SQL Cursor, SQL Function, SQL Order By

This Ranking Functions Quiz uses two tied scores to ask what number the next student gets from ROW_NUMBER, RANK and DENSE_RANK. The answer is 3, 3 and 2. A tested script proves it and replaces a cursor loop with one query.

Read More
Recovery Broker options.

SQL SERVER – Target Recovery Time of a Database – Advance Option in SQL Server 2012

December 27, 2011
Pinal Dave
SQL Tips and Tricks
SQL Backup and Restore, SQL Function

Target Recovery Time is a new database option in SQL Server 2012. Set it above 0 and SQL Server uses indirect checkpoints to limit recovery time.

Read More
Conversion failed.

SQL SERVER – A Quick Trick about SQL Server 2012 CONCAT Function – PRINT

December 21, 2011
Pinal Dave
SQL Interview Questions and Answers
SQL Function, SQLAuthority Book Review

A quick trick with the SQL Server 2012 CONCAT function: three SQL experts suggested within minutes that it works with the PRINT statement too.

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
SQL SERVER - Effect of SET NOCOUNT on @@ROWCOUNT

SQL SERVER – Effect of SET NOCOUNT on @@ROWCOUNT

December 2, 2011
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server

Does SET NOCOUNT change @@ROWCOUNT? I ran a quick demo in a session and ten hands went up before I even hit execute. The script and what it shows.

Read More
Previous 1 … 37 38 39 40 41 42 43 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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