Solved

Mysql database - RESET or FLUSH command help, urgent question

Posted on 2004-04-24
4
388 Views
Last Modified: 2012-08-13
I have an urgent question.
How do I reset the data in a Mysql database table. I need to reset the values of a certain field to Zero. I have a PTR site and need the clicks reset to zero. Can anyone help? I think I should use the Reset or Flush command but I'm not sure how to do this correctly.

Thanks in advance!
Pat
0
Comment
Question by:plovell66
4 Comments
 
LVL 2

Accepted Solution

by:
LordSilk earned 500 total points
Comment Utility
Hi,

Why don't you just update the field in the table?

update <tablename>
set <fieldname> = 0

This will set all values of the column <fieldname>  in the table <tablename> to zero.
For more info on the update statement : http://dev.mysql.com/doc/mysql/en/UPDATE.html

The Flush and Reset commands are used to clear the cache of the MySQL server, not the data...



0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

This article describes some very basic things about SQL Server filegroups.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now