C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Active Directory »

Updating or deleting a single row in SQL Server


Posted Date: 10 Mar 2008    Resource Type: Code Snippets    Category: Active Directory
Author: KalyanMember Level: Gold    
Rating: 1 out of 5Points: 3




Sometimes you may want to update only a single using the UPDATE statement. However, normally the update statement will update all rows which match the WHERE clause. To only update the first one, use the SET ROWCOUNT function on the previous line:

SET ROWCOUNT 1
DELETE FROM Orders where OrderID = @OrderIDThen, you need to disable ROWCOUNT by setting it to zero.

SET ROWCOUNT 0




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to hide a control using javascript
Previous Resource: Encrypting Passwords from Within SQL Server
Return to Discussion Resource Index
Post New Resource
Category: Active Directory


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use