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
VIRUS - BO aka Back Orifice
A second drive (USB thumb drive?) for page file
Dell Inspiron 1501 Slow typing response and ATI driver problem
Stoping an animated gif from freezing
COMPRESS an SWF File... It takes too long to load
Using a LIST and LOOP within a batch file
How do I graph elapsed times
communication link failure for a few single users
How to check for null value in trigger?
Using ActionScript to age off content.