[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql
Subject:    Re: Conditional deletes
From:       Tõnu Samuel <tonu () spam ! ee>
Date:       1999-06-30 21:40:53
[Download RAW message or body]

Robert Hazeltine wrote:

> Is there a way to do it in SQL with, say, IFNULL?  Or do I have to query
> the database before deleting the record(s)?

NO! You can issue DELETE anytime and nothing goes wrong if for example
database is empty at all or just your criteria was not met.

Do just like:

DELETE FROM table WHERE field=value

        Tõnu.


---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail mysql-thread6328@lists.mysql.com

To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail mysql-unsubscribe@lists.mysql.com instead.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic