Quick examples of PI(), POWER() and EXP() in SQL Server, and the answer to the title: EXP to the POWER of PI returns 23.1406926327793.
SQL SERVER – Convert Text to Numbers (Integer) – CAST and CONVERT
How to convert text to integer with CAST and CONVERT, whether they fail on alpha-numeric values (yes), and how to pull only the numbers from a string.
CONCAT_WS: Keep NULL and Empty Strings Separate
CONCAT_WS joins values with a separator, but NULL and empty strings have different effects. These examples keep the original fields beside the combined text and byte length.
LAST_VALUE: Set the Window Frame for the Final Row
LAST_VALUE changes with its window frame. Compare implicit and whole-partition frames, order tied rows and preserve a final NULL.
BIT_COUNT: Count Set Bits Without Changing Integer Width
BIT_COUNT counts active positions in a typed value. Keep integer width visible and distinguish a missing mask from a zero count.
SQL SERVER – Explanation of WITH ENCRYPTION clause for Stored Procedure and User Defined Functions
Use WITH ENCRYPTION to hide the code of a stored procedure or UDF, but keep a copy of the script. Once encrypted, there is no simple way to decrypt it.







