A query runs fine in test but slow in production? SQL Server 2016 tools add a way of comparing execution plans so you can find what changed.
MySQL – Get Latest Identity Value by Inserts
In MySQL, use the LAST_INSERT_ID() function to get the latest identity value after an insert, like @@IDENTITY or SCOPE_IDENTITY() in SQL Server.
MySQL – Different Methods to Know MySQL Version
Three simple ways to find your MySQL version with SQL: @@version, the version() function and SHOW VARIABLES, plus why the server version matters.
SQL SERVER – Trick – Running SSMS With Different Windows Account
Many admins have a regular and an admin login. Instead of logging off, here is a trick for running SSMS with a different Windows account on the same desktop.
SQL SERVER – One Trick of Handling Dynamic SQL to Avoid SQL Injection Attack?
SQL Injection is not a SQL Server problem, it comes from coding habits. Here is one trick of handling dynamic SQL to avoid SQL injection attack on a search page.
SQL SERVER – Watching Table Variable Data in TempDB
Are table variables only in memory? I watch table variable data in TempDB to answer a reader’s questions on where it is stored and if it is logged.







