SQL SERVER – Simple Example of WHILE Loop With CONTINUE and BREAK Keywords

This question is one of those questions which is very simple and most of the users get it correct, however few users find it confusing for the first time. I have tried to explain the usage of simple WHILE loop in the first example. BREAK keyword will exit the stop the while loop and control is moved to the next statement after the while loop. CONTINUE keyword skips all the statement after its execution and control is sent to the first statement of while loop. Run following examples in Query Editor and see the result. This is very easy to understand example for CONTINUE and BREAK keywords.

Read More

SQL SERVER – Get Permissions of My Username / Userlogin on Server / Database

A few days ago, I was invited to one of the largest database company. I was asked to review database schema and propose changes to it. There was special username or user logic was created for me, so I can review their database. I was very much interested to know what kind of permissions I was assigned per server level and database level. I did not feel like asking their Sr. DBA the question about permissions.

Read More

SQL SERVER – Difference Between @@Version and xp_msver – Retrieve SQL Server Information

Just a day ago, I was asked which SQL Server version I am using. I said SQL Server 2005. However, the person I was talking was looking for more information then that. He requested more detail about the version. I responded with SQL Server 2005 Service Pack 2. After the…
Read More

SQL SERVER – 2005 – Fix : Error : Msg 7411, Level 16, State 1 Server is not configured for RPC

Error : Msg 7411, Level 16, State 1 Server is not configured for RPC This was annoying error which was fixed by Jr. DBA, whom I am personally training at my organization. I think he is going to be great programmer. He worked in my organization for more than 8…
Read More
Exit mobile version