On Tue, Mar 20, 2001 at 03:44:44PM -0800, Marcus Ouimet wrote:
>       I went into my database today and noticed that there was 102,000 entries.
> Somehow a whole pile of crap was added to the end of the database. I think
> it can easily be fixed but am not sure. Is there a way that I can eliminate
> all entries with a field that is blank? ie:
> 
> if the table products is blank in the name field delete it?
> 
> Is this possible?

The DELETE SQL statement has a WHERE clause similar to that of the SELECT
statement; of course you can do a:

DELETE FROM table WHERE field = '';

or, maybe more relevant,

DELETE FROM table WHERE field IS NULL;

depending on what exactly you mean by 'blank'.

G'luck,
Peter

-- 
Hey, out there - is it *you* reading me, or is it someone else?

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to