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
Introducing Exchange 2003 server into a Single Domain with a Exchange 2000 domain Controller.
LSASS.exe cpu usage
Force Cached mode in Exchange 2003
If I have two email accounts in Outlook, how do I send emails from each one with the correct email address showing?
outlook 2007 hanging on exchange 2007
Several copies of same fillable page in one document -- same form fields on each page but form fields must be named differently
Online Tutorials.
Use stored procedure as dataset in SSRS
Test for interactive vs non-interactive shell
Purchase receipts details