December 6, 2024 at 12:00 am
Comments posted to this topic are about the item Subqueries II
December 6, 2024 at 7:46 am
Two of the options look identical. I'm not sure there's a right answer to this at the moment.
How to post a question to get the most help http://www.sqlservercentral.com/articles/Best+Practices/61537
December 6, 2024 at 7:49 am
There are all sorts of wrong with that code, but only one that actually stops it from executing.
December 6, 2024 at 10:39 am
If you're just seeing if the customerid exists in the other table shouldn't this be an EXISTS clause? No need to return the results of the subquery just see if what you need is there or not and be on your way...
December 6, 2024 at 1:28 pm
If you're just seeing if the customerid exists in the other table shouldn't this be an EXISTS clause? No need to return the results of the subquery just see if what you need is there or not and be on your way...
True, but if you look closely at the subquery, it doesn't quite do that. Probably not intentionally, though...
December 6, 2024 at 2:59 pm
Two answers are the same. I wanted to pick that you can't have ORDER BY in a subquery but that wasn't an option.
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
December 6, 2024 at 4:27 pm
Apologies for the duplicate answer. That doesn't affect the question, but I'll award back points and change it to something else (wrong).
December 6, 2024 at 5:28 pm
Thanks, Steve! Always appreciate your QOTD.
-- webrunner
-------------------
A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply