Interviews - C# Corner

shaikh shahbaz
What Is CTE in Sql Server 2005 ?
By shaikh shahbaz in SQL Server onFeb 09 2011
  • sarika jain
    Feb, 2011 11

    CTE (Common Table Expression) is the new and interesting feature of SQL Server 2005.Now,CTE stores the result as temporary result set from inside a statement.CTE is used when creating tables on the fly inside a  nested select and doing recursive function.CTE can be used for select and DML statements.

    For example:

    use AdventureWorks

    go

    with MyCte( ListPrice , SellPrice) As

    {

                select ListPrice , ListPrice * .95 from Production.Product

    }

    select * from MyCte

    • 0
  • Manish Dwivedi
    Feb, 2011 10

    Hi shaikh,

    Take the reference of this article.
    http://www.c-sharpcorner.com/UploadFile/skumaar_mca/CTE200509142009094057AM/CTE2005.aspx

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS