“The Original Developers believed in being thorough,” writes Aaron M “they also believed that ‘thorough’ meant having a stored procedure for every possible thing.”

“One of the more bizarre stored procedures I’ve come across is this.”

CREATE PROCEDURE [usp_GetYesNoOptions]
AS

SELECT
	ValueId = CAST( 0 AS BIGINT ), 
	ValueContent = N'No'
UNION
SELECT
	ValueId = CAST( 1 AS BIGINT ), 
	ValueContent = N'Yes'

“At first, I thought they were being wise and using BIGINTS (which allows for 263 more options) instead of INTs (which cap out at 231), but then I realized they really limited themselves with the naming choice.”

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!