SQL SERVER – Comparison : Similarity and Difference #TempTable vs @TempVariable

#TempTable and @TempVariable are different things with different scope. Their purpose is different but highly overlapping. TempTables are originated for the storage and & storage & manipulation of temporal data. TempVariables are originated (SQL Server 2000 and onwards only) for returning date-sets from table-valued functions. Common properties of #TempTable and…
Read More

SQL SERVER – 2005 Comparison SP_EXECUTESQL vs EXECUTE/EXEC

Common Properties of SP_EXECUTESQL and EXECUTE/EXEC The Transact-SQL statements in the sp_executesql or EXECUTE string are not compiled into an execution plan until sp_executesql or the EXECUTE statement are executed. The strings are not parsed or checked for errors until they are executed. The names referenced in the strings are…
Read More

SQL SERVER – Explanation of WITH ENCRYPTION clause for Stored Procedure and User Defined Functions

This article is written to answer following two questions I have received in last one week. Questions 1) How to hide code of my Stored Procedure that no one can see it? 2) Our DBA has left the job and one of the function which retrieves important information is encrypted,…
Read More

SQL SERVER – Fix : Error : Server: Msg 131, Level 15, State 3, Line 1 The size () given to the type ‘varchar’ exceeds the maximum allowed for any data type (8000)

Error: Server: Msg 131, Level 15, State 3, Line 1 The size () given to the type ‘varchar’ exceeds the maximum allowed for any data type (8000) When the the length is specified in declaring a VARCHAR variable or column, the maximum length allowed is still 8000. Fix/WorkAround/Solution: Use either…
Read More
Exit mobile version