Can you please elaborate? Where are you storing this unique "column"? Where are you "entering" it? What code causes the exception?
In general, you use a try...catch() clause to catch an exception:
I suggest you find a beginning Java text. Any text worth its salt will have at least an introduction to exception handling that will provide more details than I have given here. Alternatively, you chould check out the exception handling section in the Java Tutorial (see the link in my sig).