Eliminate magic numbers from SQL queries
22 Jan 2020
sqlWITH Constants AS ( SELECT Foo = 42)
SELECT *
FROM Bar
CROSS JOIN Constants
where Bar.Baz = Constants.Foo
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.