Simple interest in SQL Server is principal times rate times years divided by 100, and a T-SQL function returns it in one line. This post shows how an int return type drops the cents and what SCHEMABINDING changes. It measures the cost of a scalar function on 500,000 rows and ends with compound interest.
SQL SERVER – Difference Between Count and Count_Big
The difference between Count and COUNT_BIG includes result range and indexed-view requirements. Their row-counting rules are the same.
Bitwise Puzzle – SQL in Sixty Seconds 160
Many did not believe in the real world and based on the request, I have made the recent video on the same topic of the bitwise puzzle.
Change Join Type for a Query: HASH, LOOP and MERGE Hints
To change join type for a query, add one of three hints to its OPTION clause. This post runs one join with each hint on two filters and compares the join type and the logical reads. It shows that no join type is best in general, and what a join hint in the FROM clause does to the join order.
SQL Puzzle – Unsolved CASE Expression
This Unsolved CASE puzzle asks you to predict its result before execution. The preceding bitwise challenge drew more than 125 responses.
SQL SERVER – Change Password at the First Login
MUST_CHANGE requires a SQL-authenticated login to change password at its first connection. Policy options and the client workflow must support it.







