How do I delete all the duplicate records in a MySQL table without temp tables
I’ve seen a number of variations on this but nothing quite matches what I’m trying to accomplish.
I’ve seen a number of variations on this but nothing quite matches what I’m trying to accomplish.
I inserted between two tables fields A,B,C,D, believing I had created a Unique Index on A,B,C,D to prevent duplicates. However I somehow simply made a normal index on those. So duplicates got inserted. It is 20 million record table.
I want to create a unique id but uniqid()
is giving something like '492607b0ee414'
. What i would like is something similar to what tinyurl gives: '64k8ra'
. The shorter, the better. The only requirements are that it should not have an obvious order and that it should look prettier than a seemingly random sequence of numbers. Letters are preferred over numbers and ideally it would not be mixed case. As the number of entries will not be that many (up to 10000 or so) the risk of collision isn’t a huge factor.