Resources » Code Snippets » SQL

Update Top N rows in sql server 2005


Posted Date: 29-Sep-2007  Last Updated:   Category: SQL    
Author: Member Level: Gold    Points: 4






SQL Server 2005 enables us to update specific number of top rows in our table. Its completely a new feature added in sql server 2005



-- USING TOP(N) WITH UPDATE OPERATION
UPDATE TOP(3) tablename SET NAMES='HCL'




Did you like this resource? Share it with your friends and show your love!

Responses to "Update Top N rows in sql server 2005"

No responses found. Be the first to respond...

Feedbacks      

Post Comment:




  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:   Sign In to fill automatically.
    Email: (Will not be published, but required to validate comment)



    Type the numbers and letters shown on the left.


    Submit Article     Return to Article Index

    Subscribe to Subscribers
    Active Members
    TodayLast 7 Daysmore...

    Awards & Gifts
    Talk to Webmaster Tony John

    Online Members

    Pawan Awasthi
    More...
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India