Monday, January 18, 2010

Are there any specific cases where using a SQL correlated sub-query is absolutely unavoidable?

To any and all SQL experts... Are there any specific cases where using a correlated sub-query is absolutely unavoidable? In other words, a correlated sub-query must be used and is the only method that allows for finding the desired solution. If Yes or No, please explain with example(s) and your logic. Thanks very much!Are there any specific cases where using a SQL correlated sub-query is absolutely unavoidable?
If limited only to a single SQL statement, then 'yes', there are any number of possible scenarios where an answer set could only be reached by using a correlated subquery. However, if you are also allowing the usage of embedded SQL within scripts, etc., I can't think of any scenario where a correlated subquery couldn't be replaced by multiple procedural steps within a script.
  • eye look
  • No comments:

    Post a Comment