You know, work
Going Further
If this is the kind of SQL Server stuff you love learning about, you’ll love my training. I’m offering a 75% discount to my blog readers if you click from here. I’m also available for consulting if you just don’t have time for that and need to solve performance problems quickly.
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.
Thanks!