Posts

Showing posts from August 22, 2013

Delete Duplicate Entry & Update Table By Copying Data From One Table to Other

Image
Suppose you want to take regular updates from various servers and store them in your own database for any valid reason. Then you will face problem of duplicate entry in your database. To understand this suppose you want to store various RSS Feeds news for further analysis then you will automatically refresh your page in certain time interval but in such situation your database will capture various duplicate entry also. To avoid such thing happen with you you will have to manage it will proper algorithm. Okay look at this technique and i hope this will help you a lot. 1. Take Two Table named as "FirstTable" and "SecondTable". Second Table will be your main table which stores actual data without duplicate entry. First Table will store updates only. 2. With the help of some logic we first take our updates first to "FirstTable" and then we will check weather "SecondTable" has same rows or columns. 3. If it has same rows and columns then delete