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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to list all field names in the result set using mssql_field_name()?

951


Is it ok to shrink transaction log?

1048


What is the purpose of sql profiler in sql server? : sql server database administration

1152


What is an indexing strategy?

1062


Where is my database stored on the hard disk in ms sql server?

1106


Can coalesce return null?

1058


How do you create an execution plan?

995


how to take backup bcp out for a column in table in sql server?

2141


What is report snapshot?

163


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

1137


What objects does the fn_my_permissions function reports on? : sql server security

1080


Can an automatic recovery be initiated by a user?

1064


What is the difference between local and global temporary tables?

1188


What can be used instead of trigger?

1205


What is sql server management studio? : sql server management studio

1118