Can we rewrite subqueries into simple select statements or
with joins? Example?

Answer Posted / divya kalra

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.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is create statement?

606


How to modify existing triggers using "alter trigger"?

628


What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?

600


Do you know what is replace and stuff function in sql server?

579


Tell me in brief how sql server enhances scalability of the database system?

613






What is sql view?

625


What is forward - only cursors / read only cursor?

626


What do you mean by a dependent functionality in a build?

747


How to set database to be read_only in ms sql server?

639


What are different types of collation sensitivity?

622


What is a sql join?

646


When cursors are useful?

654


What are diverse clauses that form a part of sql?

681


How to recreate an existing index in ms sql server?

623


What stored by the model? : sql server database administration

627