Received: from oxmail.ox.ac.uk (oxmail3.ox.ac.uk [129.67.1.180]) by hub.org (8.9.3/8.9.3) with ESMTP id HAA56563 for ; Sat, 8 Apr 2000 07:48:30 -0400 (EDT) (envelope-from moray.mcconnachie@computing-services.oxford.ac.uk) Received: from heraldgate1.oucs.ox.ac.uk ([163.1.2.49] helo=frontend1.herald.ox.ac.uk ident=exim) by oxmail.ox.ac.uk with esmtp (Exim 3.12 #1) id 12dtfP-0000Vg-00; Sat, 08 Apr 2000 12:44:43 +0100 Received: from ermine.ox.ac.uk ([163.1.2.13] helo=mainbox ident=root) by frontend1.herald.ox.ac.uk with smtp (Exim 2.02 #1) id 12dtfO-00073h-00; Sat, 8 Apr 2000 12:44:43 +0100 Message-ID: <006e01bfa14f$ccade520$01c8a8c0@malthouse.private.net> From: "Moray McConnachie" To: , References: <01BFA0A8.629AB840.justinlong@strategicnetwork.org> Subject: Re: SQL syntax for updating tables Date: Sat, 8 Apr 2000 12:44:28 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2615.200 X-Mimeole: Produced By Microsoft MimeOLE V5.00.2615.200 X-Archive-Number: 200004/80 ----- Original Message ----- From: Justin Long To: Sent: Friday, April 07, 2000 8:46 PM Subject: [SQL] SQL syntax for updating tables > I'm trying to figure this out and I'm stumped. Perhaps someone else has > done it. > > I have two tables: > > SIGMEMBER > > and > > MEMBER > > The MEMBER table has a USERID field and an EMAIL field. SIGMEMBER has the > same two fields. I am trying to update SIGMEMBER from MEMBER such that when > member.userid = sigmember.userid, it replaces sigmember.email with > member.email. UPDATE sigmember SET sigmember.email=member.email WHERE sigmember.userid=member.userid; should work.