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

Find first and last day of current month in sql server

978


between cast and convert which function would you prefer and why?

917


How to get a list of table columns using the "sp_columns" stored procedure in ms sql server?

961


What is data file in computer?

893


What is a filestream?

945


Describe in brief system database.

951


What are the differences between clustered and non-clustered index?

956


Can we hide the definition of a stored procedure from a use?

1135


How to get a list of columns in a view using the "sp_help" stored procedure?

991


How to delete a database in ms sql server?

1120


How to provide values to stored procedure parameters in ms sql server?

976


What is the difference between update lock and exclusive lock?

913


What type of locking occurs during the snapshot generation? : sql server replication

1264


Explain the use of containers in ssis and also their types?

912


What is rtm version in sql server?

980