Microsoft
Software
Hardware
Network
Question : How to avoid duplicate record in Mysql
I have two questions:
1- My table has duplicate records eg. same symbol,date,time but value is different. How can I
delete these duplicate records?
2- How can I modify my table so that whenever I insert a record (index selected based on
symbol,date,time), the MySQL will reject those have the same index (combination of
symbol,date,and time)?
Thx,
XT
Answer : How to avoid duplicate record in Mysql
You need an unique index. You can do this in one operation:
alter ignore table TableName add unique index IndexName (`symbol`,`date`,`time`);
This will delete duplicates and create an unique index, preventing future inserts of duplicate rows.
Random Solutions
How Do You Force a .doc Link to Open Up in Word not a Browser in Flash
document not saved
CRM Integration w/ 3rd Party Email Campaign Service
MAPI error when attempting to Restore a Mailbox from a Recovery Storage Group
IE7 toolbar and Address bar is autohiding
How do I request a domain controller certificate for my domain controllers?
Dynamically creating relational tables / values...
help modifying javascipt for a checkbox control
I have Webroot Spysweeper 6.1 and NIS 2009 (on Win XP media center SP3). I have been getting the same messsages that svchost is attempting to delete perfdisk,tcpip, and netbt.
exporting to a CSV AD info.