Interview question: write one script that inserts multiple rows in a single SQL query and runs unchanged in SQL Server, MySQL and PostgreSQL. Here is my answer.
SELECT One by Two – Interview Question Extended – Part II
After my SELECT One by Two puzzle, I played with a small extension: three queries mixing 1. and 1/2. Can you guess what each one returns and why?
SQL SERVER – Computed Column and Conditions with Case Statement
How to write conditions with CASE statement in a computed column, using a simple AdventureWorks script you can adapt for any complicated logic.
SQL SERVER – Identify Table Where Clustered Index is Not a Primary Key – DMV
Let us first see script which will return us tablename with schema where clustered index is not a primary key.
What is Difference Between HAVING and WHERE – Interview Question of the Week #068
Clients sometimes interview me, and my answers from experience do not always match the textbook. Last week’s Interview Question: HAVING versus WHERE.
PowerShell Script – Backup Every Database In SQL Server
A client wanted to automate backups with a script instead of a GUI. Here is the PowerShell and SMO script I have used for years to backup every 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.






