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

How can we check the sql server version?

550


Do you know sql server 2008 backup compression?

558


What is meant by Active-Passive and Active-Active clustering setup?

545


What do you mean by recursive stored procedure?

502


You want to be sure that queries in a database always execute at the maximum possible speed. To achieve this goal you have created various indexes on tables which other statement will keep the database in good condition?

526






What do you mean by authentication modes in sql server?

603


How to count groups returned with the group by clause in ms sql server?

549


Explain mixed authentication mode of sql server?

537


Define inner join in sql server joins?

528


What do you mean by an execution plan? Why is it used?

522


how to restart sql server in single user mode? How to start sql server in minimal configuration mode? : Sql server database administration

451


What are the options which must be set to allow the usage of optimistic models?

503


What are the types of normalization?

542


What is the difference between functions and scalar functions?

563


Explain full-text query in sql server?

526