Onloac Posted November 30, 2010 Share Posted November 30, 2010 quick question... I have a column in my table called views. I want to reset the column to 0 for each row in the table. What's the easiest way to do this? Quote Link to comment Share on other sites More sharing options...
litebearer Posted November 30, 2010 Share Posted November 30, 2010 if you are resetting that field in ALL the rows, a simple "UPDATE tablename set field_name = 0" should do the trick. When you DON'T use a condition (ie WHERE somefield = some_value) all records are updated Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.