On Monday 27 May 2002 10:59, Markus Lervik wrote:
> (filter fodder: sql, query)
>
> Hello group!
>
>
> Quick question:
>
> Is there a simple way to do something like INSERT IF NOT EXISTS,
> other than first doing a SELECT and checking if it returns any rows?
> If not, that would be pretty high up on my whish-list : )
>

Yes: INSERT IGNORE INTO ...

You can read more at http://www.mysql.com/doc/I/N/INSERT.html


-- 
João Paulo Vasconcellos
Gerente de Tecnologia - NetCard
Tel. 21 3852-9008 Ramal 31
[EMAIL PROTECTED]


---------------------------------------------------------------------
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