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 trimmed date fruit on a cutting board with the trimmings in a small red dish

Change in Date Format: Why LEFT Turns GETDATE Into Text

September 20, 2016
Pinal Dave
SQL Puzzle
SQL DateTime, SQL Function, SQL Scripts, SQL Server

A change in date format shows up when you apply LEFT to GETDATE: the date goes from year first to month name first. This puzzle explains the implicit conversion behind it, how language settings change the text, and how to get the date you want on purpose.

Read More
SQL SERVER - Understanding How to Play With Row Constructor

SQL SERVER – Understanding How to Play With Row Constructor

September 5, 2016
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL String

A code review surprised me with an unusual use of the Row Constructor. Here is what the code did and how you can play with row constructors yourself.

Read More
An unmarked seven-compartment organizer sits beside a movable grouping boundary.

SQL SERVER – Find Week of the Year Using DatePart Function

September 2, 2016
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts, SQL Server

The DATEPART function returns a week number according to its week definition. I choose that convention before using calendar logic.

Read More
SplitMyString SQL Server result set.

SQL SERVER – Puzzle – Solve Splitting Strings Puzzle

June 2, 2016
Pinal Dave
SQL Puzzle
SQL Function, SQL Scripts, SQL Server, SQL String

A Splitting Strings puzzle: take a column holding delimited values, split them and return how many values each row has. How would you solve it?

Read More
Gouache painting: three garden gates in a row along a stone path, each closed and each with its own key hanging beside it; the last key is vermilion

SQL SERVER – Why DBAs Need to Know about Kerberos – Notes from the Field #126

May 26, 2016
Pinal Dave
SQL Tips and Tricks
Notes from the Field, SQL Function, SQL Server Security

Not everyone knows about Kerberos. Many think it is a two headed dog from mythology, well that is true but when we talk about database,

Read More
MySQL - LEAST and GREATEST Comparison Operators

MySQL – LEAST and GREATEST Comparison Operators

April 19, 2016
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Function, SQL Operator, SQL Scripts

Comparing values across many columns is a common chore. Here is how the MySQL LEAST and GREATEST comparison operators find the smallest and largest value.

Read More
MySQL - FOUND_ROWS() Function for Total Number of Rows Affected

MySQL – FOUND_ROWS() Function for Total Number of Rows Affected

April 15, 2016
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Function, SQL Scripts

In SQL Server you get the number of rows affected with @@ROWCOUNT. In MySQL, you can find the total number of rows with FOUND_ROWS().

Read More
Previous 1 … 18 19 20 21 22 23 24 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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