Please read SQL SERVER – How to Retrieve TOP and BOTTOM Rows Together using T-SQL before continuing this article. I had asked users to come up with an alternate solution of the same problem. In this blog post we will see solution with the help of CTE.
SQL SERVER – Find Nth Highest Record from Database Table
I had previously written SQL SERVER – Query to Retrieve the Nth Maximum value. I just received an email that if I can write this using AdventureWorks database as it is a default sample database for SQL Server 2005 and the user can run the query against it and understand it better. Let us see how we can find highest record from database.
SQL SERVER – Simple Example of Cursor – Sample Cursor Part 2
I have recently received email that I should update SQL SERVER – Simple Example of Cursor with example of AdventureWorks database. Simple Example of Cursor using AdventureWorks Database is listed here. USE AdventureWorks GO DECLARE @ProductID INT DECLARE @getProductID CURSOR SET @getProductID = CURSOR FOR SELECT ProductID FROM Production.Product OPEN @getProductID FETCH…
Read MoreSQL SERVER – Transfer The Logins and The Passwords Between Instances of SQL Server 2005
This question was asked to me by one of reader. “I just upgraded my server with better hardware and newer operating system. How can I transfer the logins and the passwords between two of my SQL Server?” I think Microsoft has wonderful documentation for this issue. kb 918992 I will…
Read MoreSQL SERVER – Introduction to SQL Server Encryption and Symmetric Key Encryption Tutorial
SQL Server 2005 provides encryption as a new feature to protect data against the attacks of hackers. Hackers may be able to get hold of the database or tables, but they wouldn’t understand the data or be able to use it. It is very important to encrypt crucial security related…
Read More