SELECT GETDATE() shows both date and time. A simple Date Format puzzle: show only the date part using a function. How many ways can you find?
SQL SERVER – Understanding How to Play With Row Constructor
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.
SQL SERVER – Find Week of the Year Using DatePart Function
I plan my blog a week at a time. Here is a query using the DATEPART function to get the week of the year plus the first and last date of that week.
SQL SERVER – Puzzle – Solve Splitting Strings Puzzle
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?
SQL SERVER – Why DBAs Need to Know about Kerberos – Notes from the Field #126
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,
MySQL – LEAST and GREATEST Comparison Operators
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.
MySQL – FOUND_ROWS() Function for Total Number of Rows Affected
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().







