On Sat, Nov 02, 2002 at 12:58:34AM -0600, Thomas T. Thai wrote:
> I have two columns in a table:
>
> email varchar(64)
> verified boolean
>
> How do I make a check for unique email that is verified while allowing for
> non-verified emails to be not unique?
create unique index check_index on table(email) where verified = 't';
Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.