A very simple example of WHILE Loop with BREAK and CONTINUE, plus a Books Online sample that uses a SELECT query in the WHILE condition.
SQL SERVER – Find All The User Defined Functions (UDF) in a Database
A very simple script that lists all the User Defined Functions in a database, with schema name and type, by reading sys.objects in SQL Server.
binary Conversion: Strings and Numbers Pad on Different Sides
binary Conversion pads and truncates on different sides depending on the source type. I compare one integer with one string at two target widths. The resulting byte sequences show why width alone is not the complete rule.
REPLICATE: Zero Copies and Negative Counts Differ
REPLICATE treats zero copies differently from a negative count. I keep the source and requested count beside the result. Byte lengths and NULL flags reveal several blank-looking outcomes.
SQL SERVER – 2005 – Database Table Partitioning Tutorial – How to Horizontal Partition Database Table
A simple Table Partitioning tutorial for SQL Server 2005 that shows, step by step, how to horizontally partition a database table across two filegroups.
SQL SERVER – Get a Row Per File of a Database as Stored in the Master Database
Each database has at least two files. This quick script on sys.master_files returns a row per file of a database, just as it is stored in master.
UNICODE: Supplementary Characters Depend on the Collation
UNICODE returns an integer for the first character, and supplementary-character support affects that integer. I make the collation explicit when interpreting those values. Otherwise the same visible input can produce a misleading comparison.






