A classic interview question: write a query to retrieve the second highest salary, or any Nth highest, from an employee table using a correlated subquery.
MySQL – Date and Time Related System Functions
MySQL has several date and time related system functions, like curdate(), curtime(), now(), current_timestamp() and UTC versions such as utc_timestamp().
SQL SERVER – Recompiling InMemory OLTP with SQL Server 2016
Can you recompile natively compiled InMemory stored procedures? I test recompiling InMemory OLTP objects in SQL Server 2016 with a step by step demo.
Readable Secondary in Standard Edition: Transactional Replication Setup
A secondary server sitting idle as a backup feels like a waste. In Notes from the Field #107, Kenneth Urena shows how to build a readable secondary in Standard Edition with transactional replication.
SQL SERVER – Server Side and Client Side Trace
Running Profiler on the server does not make it a server side trace. I explain the real difference between server side and client side trace in SQL Server.
Extracting the Folder and File Name From a Full Path in T-SQL
Split a path at the last backslash and handle the odd inputs. Bare names, empty values, trailing spaces and NULL all behave.






