and insert,
another thread inserts a matching record?
Do we have any alternative?
Thanks,
Ravi.
-Original Message-
From: Douglas Sims [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 29 August, 2006 10:48 AM
To: Ravi Kumar.
Cc: mysql@lists.mysql.com
Subject: Re: Conditional Insert
Hi Ravi
Standard
alternative?
Thanks,
Ravi.
-Original Message-
From: Douglas Sims [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 29 August, 2006 10:48 AM
To: Ravi Kumar.
Cc: mysql@lists.mysql.com
Subject: Re: Conditional Insert
Hi Ravi
Standard SQL syntax doesn't provide for that. You could wrap the
whole
Subject: Re: Conditional Insert
Hi Ravi
Standard SQL syntax doesn't provide for that. You could wrap the whole
thing in a transaction, possibly in a stored procedure, but this would be
rather awkward.
However, MySQL has a command called REPLACE which I think will do
exactly
what you want:
http
.
-Original Message-
From: Douglas Sims [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 29 August, 2006 10:48 AM
To: Ravi Kumar.
Cc: mysql@lists.mysql.com
Subject: Re: Conditional Insert
Hi Ravi
Standard SQL syntax doesn't provide for that. You could wrap the
whole
thing in a transaction, possibly
Douglas Sims wrote:
Hi Ravi
You are correct. I was just sitting here thinking about this after I
sent that and realized that what I said was incorrect; the REPLACE
command will not do what you want, because it delete a record instead
of updating it, it has no way to know what the
To: Johan Höök
Cc: Ravi Kumar.; mysql@lists.mysql.com
Subject: Re: Conditional Insert
Much better. Good job.
Douglas Sims
[EMAIL PROTECTED]
On Aug 29, 2006, at 1:26 AM, Johan Höök wrote:
Hi Ravi,
you can take a look at:
http://dev.mysql.com/doc/refman/5.0/en/insert-on-duplicate.html
which might
Hi Ravi
Standard SQL syntax doesn't provide for that. You could wrap the
whole thing in a transaction, possibly in a stored procedure, but
this would be rather awkward.
However, MySQL has a command called REPLACE which I think will do
exactly what you want:
Hello.
Please, provide more information on your's application logic.
To catch events which occurs for the table use triggers. See:
http://dev.mysql.com/doc/mysql/en/triggers.html
Unfortunately they're available only in MySQL 5.0.x, which is still
beta.
Paul Halliday [EMAIL
Ok,
The entire table looks like this:
ip | hostname | mac_current | mac_change | port_current | port_change
The IP addresses are harvested via netflow (a different table) and or
arpwatch (an event). This new table is to augment the current
information that is within the netflow tables but