A complete collection of Sql server Interview Questions,sql server performance,stored procedure, trigger,Sql query,security,ms sql server 2005,database backup,restore,free ebook,tutorials.
Jun 3, 2008
Can we rewrite subqueries into simple select statements or with joins?
Subqueries can often be re-written to use a standard outer join, resulting in faster performance. As we may know, an outer join uses the plus sign (+) operator to tell the database to return all non-matching rows with NULL values. Hence we combine the outer join with a NULL test in the WHERE clause to reproduce the result set without using a sub-query.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment