Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • But my datenum not the primary key. Commented May 17, 2011 at 11:49
  • So in my case what is the solution, I tried this one, without any solution:INSERT INTO forwind.aggregateddata (datenum,Timestamp,Min_F1_baro_20_) VALUES ('1','2','3') ON DUPLICATE KEY UPDATE datenum=datenum; Commented May 17, 2011 at 11:57
  • 1
    is datenum supposed to be unique? if yes, than add a unique index to it (if not already added) Then it will work. Refer dev.mysql.com/doc/refman/5.1/en/alter-table.html for how to ad UNIQUE indexes Commented May 17, 2011 at 14:01
  • now I defined the datenum as unique, and it's work fine, thanks Commented May 18, 2011 at 8:21
  • 1
    Just a link, maybe give an answer. Commented Jan 15, 2016 at 21:48