SPACE builds a present blank string from a count. Keep empty text and NULL separate, and choose a measurement that retains supplied spaces.
Giving an Application Account Only What It Needs
Apply least privilege SQL Server access with separate runtime and deployment roles, narrow permissions, and tests of allowed and denied actions.
What Is the Transaction Log and Why Does It Keep Growing?
The transaction log records every change before it reaches the data file. Why it grows, what log_reuse_wait_desc is telling you, how the recovery model decides everything, and the one fair reason to shrink it.
FOR XML PATH: Choose Attributes and Nested Elements With Aliases
FOR XML PATH interprets column aliases as directions for the output’s attributes and element hierarchy. I use three aliases to shape two rows. The source columns stay ordinary relational values.
geometry Line Endpoints: Preserve the Described Direction
geometry line endpoints identify the first and last described points. Reversing the same path exchanges them, while a closed line starts and ends together.
SQL SERVER – Check if Current Login is Part of Server Role Member
Clients sometimes forget to give me admin rights. IS_SRVROLEMEMBER(‘sysadmin’) checks if the current login is a Server Role Member: 1 means yes, 0 means no.







