Try looking up the REPLACE command. That does exactly what you are looking to do, but you do need a primary key for it to lookup on.

On Monday, July 7, 2003, at 10:54 AM, LeTortorec, Jean-Louis wrote:


Hello everyone,


Is there a function that first tests if a record exists, and if so updates
it, or if it does not exists, it creates that new record?


I know I can do that by checking the list of records, then update the table.
But that requires 2 queries. If I could get that done by one, that would
save me time and resource.


Thank you.

Jean-Louis

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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



Reply via email to