MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:David Christopher Zentgraf Date:September 30 2007 7:09am
Subject:Re: Restrict inserts to meet certain conditions?
View as plain text  
I'm seriously intrigued by the idea of trying postgres for this  
project...
Thanks!

On  30. Sep 2007, at 15:08, Rob Wultsch wrote:

> I am sorry for sending multiple notes. The reply to is set not being
> set to mysql discussion list. I click the reply button automatically.
> This email is for the sake of the list sake...
>
> You want a feature like a check constraint:
> http://www.postgresql.org/docs/8.1/static/ddl-constraints.html
>
> which does exist in mysql.
>
> A trigger can be used to replicate this feature, in a less than  
> ideal manner...
>
> On 9/29/07, David Zentgraf <deceze@stripped> wrote:
>> Hi,
>>
>> Is it possible to restrict Inserts and Updates to meet certain
>> conditions?
>> In one of my tables lets say field A, B and C can be NULL, but not
>> all at once. Depending on what type of item I want to store, A needs
>> to be NULL, but B and C need values, for other types A needs a value
>> but B and C can be NULL etc.
>> Is it possible to implement this checking logic on the database level
>> via CONSTRAINTs or something similar?
>>
>> Best Regards,
>> Dav
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:    http://lists.mysql.com/mysql? 
>> unsub=wultsch@stripped
>>
>>
>
>
> -- 
> Rob Wultsch
> (480)223-2566
> wultsch@stripped (email/google im)
> wultsch (aim)
> wultsch@stripped (msn)
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>

Thread
Restrict inserts to meet certain conditions?David Zentgraf30 Sep
  • Re: Restrict inserts to meet certain conditions?Rob Wultsch30 Sep
    • Re: Restrict inserts to meet certain conditions?David Christopher Zentgraf30 Sep
Re: Restrict inserts to meet certain conditions?David Christopher Zentgraf30 Sep