Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / syed sajjad

Yes we can write using Common Table Expression (CTE). A Common Table Expression (CTE) is an expression that can be thought of as a temporary result set which is defined within the execution of a single SQL statement. A CTE is similar to a derived table in that it is not stored as an object and lasts only for the duration of the query.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

how to implement locking in sql server

3 Answers   Satyam,


What is the difference between a Application Server and a Database

3 Answers   Oracle,


What is the Disadvantage of indexed sequential file.

0 Answers   HCL,


What are the purpose of Normalisation?

0 Answers   HCL,


Can you give an example of Stored Procedure?

4 Answers   Wipro,


there is a table having two columns no and name and the data is 1 A 2 B 3 C write a query that will result a horizontal output A,B,C

9 Answers   tdfc, vsworx,


What is the disadvantage of using subquery exact after a select statement?ex. select (select * from sometable)

1 Answers  


What does <> symbol mean?

0 Answers  


What is the difference between 2-Tier architecture and 3-Tier architecture

15 Answers   CTS, MCN Solutions, Oracle,


what number files will a information contain in SQL Server? How many forms of information files exist in SQL Server? How many of those files can exist for a single database?

0 Answers  


Why I am getting "the microsoft .net framework 2.0 in not installed" message?

0 Answers  


If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?

0 Answers  


Categories