A reader wanted to join values from several rows into one record. Imran Mohammed answered with a simple example of cursor code in SQL Server 2005.
SQL SERVER – Is Cursor Database Object or Datatype?
Whenever we want to loop something we always look for logic like WHILE LOOP or FOR LOOP. Trust me on my word that both of them are cursor when it is about SQL Server.
SQL SERVER – Simple Example of Cursor – Sample Cursor Part 2
A reader asked me to update my Simple Example of Cursor with AdventureWorks. Here is a sample cursor that loops through ProductID and prints each one.
SQL SERVER – Simple Example of WHILE Loop With CONTINUE and BREAK Keywords
I have tried to explain the usage of simple WHILE loop in the first example. BREAK keywords will exit the stop the while loop and control is moved.
SQL SERVER – Stored Procedure to Know Database Access Permission to Current User
Which databases can I use? Run EXEC sp_MShasdbaccess to see the database access permission of the current user. Our Jr. DBAs check it all the time.
SQL SERVER – Difference Between EXEC and EXECUTE vs EXEC() – Use EXEC/EXECUTE for SP always
What is the difference between EXEC and EXECUTE? None. The real difference is EXEC vs EXEC(), and I show why EXEC belongs before every stored procedure call.







