What is the correct syntax for stored procedure code? Anything between BEGIN and END is part of the procedure, and anything after GO is not, as my examples show.
SQL SERVER – 2005 – List All Stored Procedure in Database
Want to see all stored procedure in database at once? Run SELECT * FROM sys.procedures. This simple query works only with SQL Server 2005.
Multiset Intersection: Keep the Matching Duplicate Occurrences
Multiset intersection keeps the duplicate count shared by both inputs rather than returning each common value once. I pair numbered occurrences to express that requirement. The result should contain the smaller count for each equivalent value.
SQL SERVER – Generate Incremented Linear Number Sequence
A reader asked how to generate an incremented linear number sequence in SQL Server, like a sequence in Oracle. A short WHILE loop script does it.
DEGREES: Preserve Fractions When Converting Angles
DEGREES converts radians into degrees. An integer radian argument can narrow the output, while a float argument retains an approximate fractional degree value.
SQL SERVER – Generate Script with Data from Database – Database Publishing Wizard
The Database Publishing Wizard scripted schema and data for SQL Server 2005-era transfers. I keep that workflow separate from current SSMS instructions.
TOP WITH TIES: Keep Every Row at the Cutoff
TOP WITH TIES helps me keep equally qualified rows at a shortlist boundary. A unique ordering key changes that selection. Separate the cutoff rule from the final display order.







