In my application, a user can be identified by one of three fields - an 
nickname, a phone number or mail. None of the fields are required, but at 
least one must be completed. I am trying to make a check, which requires 
filling one of the three fields.
In SQL, I would write something like this:
...sql
CONSTRAINT username_email_phone_number_notnull CHECK (
  NOT (nickname IS NULL and email IS NULL and phone_number IS NULL)
)
```
How to write such a restriction in sequel?

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sequel-talk/c815d0c9-fa91-4006-b8cc-049136b469dfn%40googlegroups.com.

Reply via email to