On Sat, Mar 22, 2008 at 5:03 PM, Ferindo Middleton
<[EMAIL PROTECTED]> wrote:
> Is there a way to not allow empty strings in the database for a data type. I
>  have a column set to not null but sometimes users enter empty strings which
>  are also  unacceptable. How can I force MySQL to disallow empty strings in
>  addition to not null.
>
>  Ferindo
>

A trigger should work for you.
http://dev.mysql.com/doc/refman/5.0/en/triggers.html

A far better option would be validating in your app.

-- 
Rob Wultsch

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to