Many times upon executing any T-SQL queries, we like to know the performance of the query at millisecond level. But SSMS provides us information at second level as below:
SELECT *
FROM Purchasing.vVendor;

Read more…
One unbelievable tip for the day for T-SQL users. What a “GO” statement do in T-SQL.
By definition it is a batch separator. It will run a batch and commit it. But along with that it also accepts one parameter which tells the SQL engine basically how many times to do the job.
Read more…
Sp_MSForEachDB is a great procedure coming with MS SQL Server even though it is un-documented. It eases some of the complex operations that we mostly do by using CURSORS.
Read more…
Problem:
The requirement is to get top 10 employee’s name randomly from each department in a company. Let me elaborate it. Suppose in a company ABC, there are 1500 employees with 5 departments and each department have more than 200 employees. The manager wants to list down at least 10 names of the employees randomly from each department for a survey.
Solution:
Read more…
Here are some ways described to find out the total no. of days in a given month.
Read more…
Recent Comments