MySQL supports NATURAL JOIN, which maps matching columns from both tables on its own. I show how it works and the key difference from INNER JOIN.
MySQL – Reset Row Number for Each Group – Partition By Row Number
MySQL has no ROW_NUMBER() OVER (PARTITION BY), so here is how to reset row number for each group with a variable, using a simple example.
MySQL – Generating Row Number for Each Row Using Variable
MySQL has no ROW_NUMBER() function like SQL Server. Here are two methods for generating row number values for each row with a variable in a SELECT statement.
SQL SERVER – Retrieve Maximum Length of Object Name with sp_server_info
How long can a table name be in SQL Server? The answer is 128, and you can confirm it yourself by running the stored procedure sp_server_info.
Performance Statistic Collection: Notes from the Field #018
Good tuning starts with good numbers. In Notes from the Field #018, David Klee explains performance statistic collection and how DBAs should gather server data.
Sending an HTML Table by Email With sp_send_dbmail
Turn a wall of report text into a clean table. FOR XML PATH escapes your data, and a few small tricks handle NULL values and empty days.
The Outbox Table: Publishing Changes Reliably From a Transaction
Orders commit and the message vanishes? Save both in one transaction, then let a worker claim, send and retry with a lease. Duplicates are still possible.







