Triggers as a constraint but accepts nulls
I need a trigger that acts like a unique constraint on a column but i want that column to accept null values. For example: I have a table for storing purchasing data. I have a column that accepts nulls but if data is inserted in this column i want it to be unique. The only way i can think of accomplishing this is through a trigger but I cant seem to formulate the right code. If there is anyone who can help me, I would be very grateful.
|