I am using mysql.
Every month I upload a txt file create a table and then, after launching a query to flter the results, I want to add the new rows to a bigger table which keeps all the months of the year.
The table I create every month always maintains the same structure.
I have experimented that after launching the query, inserting the INSERT INTO table_name statement all the rows are effectively inserted in the bigger table, but the problems is if that I forget that one month I have already uploaded the data and I process it again there is no filter and the rows will be inserted a second time and I will find them duplicated.
Is there a way to avoid this?
I do not use primary keys on either tables.
PRIMARY KEYor a column with aUNIQUEindex is going to be trouble if these are your objectives.