I’m doing some modifications to a Copper installation for a customer that involved the addition of some new fields to their project table, namely CashContribution and InKind. They both track different donation types that can be made against a project.
I needed a quick way to populate some projects with dummy, random data, and here’s what I ended up with:
UPDATE Projects SET CashContribution = (SELECT CONVERT(RAND() * 1000, UNSIGNED)) WHERE ID > 600;
This meant that I wasn’t looking at row-after-row of the same dummy data, and that the test system better represents the intended real-world use.