If each record is being updated with exactly the same information you could
the statement

WHERE key IN (key1, key2, ...)

Otherwise you'll need an update statement for each record.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 29, 2001 21:41
Subject: Multiplle update by key


> I have a table with an autoincrement primary key, and a I hold list of the
> keys of a number of records which I want to UPDATE. How can I most
> efficiently write an UPDATE command which will update all the record whose
> keys are on my list?
>
> I thought I could put the keys I have into a temporary ram table and use
> some sort of SELECT like statement to join the temporary table to the real
> one, but I can't see any syntax for it. Is there no way to so it other
than
> to issue an individual update for every record?
>
> Alec Cawley
>
>
> <<--
> This e-mail is intended for the named addressees only.  Its contents may
be
> privileged or confidential and should be treated as such.  If you are not
> an intended recipient please notify the sender immediately; do not copy,
> distribute, or take any action based on this e-mail; and then delete it.
> In the pursuit of its legitimate business activities and its conformance
> with relevant legislation, Quantel Ltd. may access any e-mail (including
> attachments) it originates and receives, for potential scrutiny.
>
> To learn more about Quantel's Clipbox Studio, go to
> http://www.quantel.com/clipboxstudio
>
>
> ---------------------------------------------------------------------
> 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


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