List:General Discussion« Previous MessageNext Message »
From:js  Date:February 13 2007 3:54pm
Subject:Re: NOT EMPTY, like NOT NULL
View as plain text  
Hello Nils and Jerry,

Thanks you for your quick reply!

IMO, using trigger looks cleaner and prettier than Excel-like
if(char_length) hack
so I will probably give triggers a try.
Searching on the net, I found some articles on check constraints in MySQL.

http://gilfster.blogspot.com/2005/11/check-constraints-in-mysql-50.html
http://db4free.blogspot.com/2006/01/emulating-check-constraints.html
http://db4free.blogspot.com/2006/01/emulating-check-constraints-with-views.html

regards.

On 2/13/07, Nils Meyer <meyer@stripped> wrote:
> Hi Js,
>
> js wrote:
> > Is there any easy way to implement 'NOT EMPTY' constraint?
> There currently is no support for CHECK Constraints in MySQL, at least
> to my knowing. So you'd have to go with a trigger.
>
> regards
> Nils
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>
Thread
NOT EMPTY, like NOT NULLjs 12 Feb
  • Re: NOT EMPTY, like NOT NULLRolando Edwards12 Feb
    • Re: NOT EMPTY, like NOT NULLjs 12 Feb
      • RE: NOT EMPTY, like NOT NULLJerry Schwartz12 Feb
      • Re: NOT EMPTY, like NOT NULLNils Meyer12 Feb
        • Re: NOT EMPTY, like NOT NULLjs 13 Feb
  • Re: NOT EMPTY, like NOT NULLC.R.Vegelin12 Feb