Thanks for the idea, this is what I will use. The database does not exist yet and I am free to add as much columns as I like (I am the DBA). I will add a column in the table containing the serial_nr. Then, with a SELECT COUNT(*) FROM table and a SELECT record FROM table WHERE table.serial_nr = random_nr. If the record should appear to be deleted (not likely), then I re-select a record.