...a vague question if ever there was one.
Do you want to delete the duplicate records from the database for ever?
Do you want to simply select the unique IDs from the database?
Do you want to prevent duplicate ID's from appearing in the first place?
-it's impossible to offer a good response without knowing more about what it is you're trying to do.