shaikh shahbaz
What Is CTE in Sql Server 2005 ?
By shaikh shahbaz in SQL Server on Feb 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


    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.

    • 0

Most Popular Job Functions