Question: What are some other strategies on avoiding magic numbers or hard-coded values in your SQL scripts or stored procedures?
Consider a stored
I recently figured out that magic numbers can be implemented by views:
CREATE VIEW V_Execution_State AS SELECT 10 AS Pending, 20 AS Running, 30 AS Done DECLARE @state INT SELECT @state = Pending FROM V_Execution_State