in reply to Cycle through primary key with DBI

You'll probably have to do a "SELECT MAX(ID) from MYTABLE" first to check if you've reached your upper limit. I'm not entirely sure why you'd want to do this.