Not sure if I have understood your question correctly, but if I have it sounds like what you need is a queue and not a database. As long as there is at least one entry in test_trk this statement does nothing, as soon as test_trk is completely empty the statement refills the table. Statements such as USE, SET