I have an INSERT INTO SELECT query (which should insert around 80000 records), where I need to ensure new unique values are assigned to one of my key fields. No, it's not an auto-increment field. No, I don't plan on changing that fact.
If it where an update I could declare a variable and use the set to update it, but I can't find a good way to do something similar with insert into.
If it where an update I could declare a variable and use the set to update it, but I can't find a good way to do something similar with insert into.