Erik Darling Data
SQL Server Consulting, Education, and Training
I’ve been wondering for a while, but why do you use SELECT 1 / 0 instead of SELECT 1 when using NOT EXISTS? Is there a performance difference or is it just a personal preference? Our DBAs pop a blood vessel when they see 1 / 0 anywhere. Thanks,
Because it doesn’t matter, and it’s a lot easier to prove it doesn’t matter when something that should throw an error doesn’t.
Your email address will not be published. Required fields are marked *
Notify me of followup comments via e-mail. You can also subscribe without commenting.