Re: Restrict inserts to meet certain conditions?
That's what I thought. Thanks!
On 30. Sep 2007, at 14:55, Rob Wultsch wrote:
> CHECK CONSTRAINT I mean... > > On 9/29/07, Rob Wultsch <wultsch@gmail.com> wrote: >> CONSTRAINT does not exist in mysql. >> >> You can use a trigger to deal with the issue, which is obviously less >> than ideal. >> >> On 9/29/07, David Zentgraf <deceze@gmail.com> 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@gmail.com >>> >>> >> >> >> -- >> Rob Wultsch >> (480)223-2566 >> wultsch@gmail.com (email/google im) >> wultsch (aim) >> wultsch@hotmail.com (msn) >> > > > -- > Rob Wultsch > (480)223-2566 > wultsch@gmail.com (email/google im) > wultsch (aim) > wultsch@hotmail.com (msn)
--
MySQL General Mailing List
For list archives:
http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=lists@pantek.com
Received on Sun Sep 30 02:07:06 2007
This archive was generated by hypermail 2.1.8
: Sun Oct 07 2007 - 10:12:53 EDT
|