newbie: Column CHECK(col contains '@') ?

From: john-paul delaney <jp(at)justatest(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: newbie: Column CHECK(col contains '@') ?
Date: 2002-05-12 19:11:00
Message-ID: Pine.LNX.4.21.0205121705340.1265-100000@justatest.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Hello list...

One column in my table contains email addresses - I want to check that any value entered contains a '@'. How do I create a CONSTRAINT or CHECK to ensure this when creating the table?

Thanks for any help.
/j-p.

-----------------------
JUSTATEST Art Online
www.justatest.com

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message G 2002-05-12 19:24:17 Selecting random rows using weights
Previous Message Josh Berkus 2002-05-12 17:30:45 Re: newbie: Column CHECK(col contains '@') ?