SQL SERVER – Knowing the Source Application Using APP_NAME() Function

APP_NAME() function in SQL Server returns the application name of the current session in which it is called. When you execute the following code SELECT APP_NAME() AS application_name You get the following result application_name ———————————————- Microsoft SQL Server Management Studio – Query This function can be effectively used to audit…
Read More

Interview Question of the Week #025 – How to Implement Paging in SQL Server?

Here is a very popular question when SQL Server interview consists of live coding example. Question: How to implement paging in SQL Server? Explain with the help of script. Answer: Here is the script to implemented paging in SQL Server 2005. USE AdventureWorks GO DECLARE @StartRow INT DECLARE @EndRow INT…
Read More