SQL Server 2016 added DROP IF EXISTS, but MySQL has had it for years. Here is how to drop table if exists in a MySQL database.
SQL SERVER – Practical Tips to Reduce SQL Server Database Table Size – Experts Opinion
Practical tips to reduce SQL Server database table size, from my friend and SQL Server expert Sergey, for faster queries and smaller storage.
SQL SERVER – Finding Tables Created Last Week – DBA Tip Part II
Part II of finding tables created last week. Readers asked for an easier way, so here is how to do it from the SSMS user interface without writing a script.
SQL SERVER – UPDATE FROM SELECT Statement with Condition
An old college friend asked how to UPDATE one table from another with a condition. Here is his sample and the UPDATE FROM SELECT statement that solves it.
Syncing a Lookup Table Without MERGE: Insert, Update, Delete
Three plain statements can do the job of MERGE, and each one gives you its own row count. Here is how to build it, test it and trust it.
TRUNCATE Permission: Letting a User Empty One Table
Your loader needs to empty a staging table, not redesign it. Here is a small procedure that gives it exactly that.
SQL SERVER – How to Access the Previous Row and Next Row value in SELECT statement? – Part 4
Part 4 on reading the previous row and next row value in a SELECT statement. My friend Szymon Wojcik shows how a numbers table can make the query even faster.







