MySQL Forums
Forum List  »  InnoDB

Re: Fast Update
Posted by: Ferdie Palero
Date: December 04, 2016 07:11PM

Hi Peter,

Where I am wrong here, always inserting a row even it was existing.

INSERT INTO exclusive (lname,fname,mame,bname,address,city,state,zip)
SELECT a.lname,a.fname,a.mname,a.bname,a.address,a.city,a.state,a.zip
FROM exclusive a
LEFT JOIN exclusive_temp b ON b.lastname = a.lastname
AND b.fname = a.firstname
AND b.mname = a.mname
AND b.bname = a.bname
AND b.address = a.address
AND b.city = a.city
AND b.state = a.state
AND b.zip = a.zip
where a.fname is null;


Regards,
FPalero

Options: ReplyQuote


Subject
Views
Written By
Posted
628
November 30, 2016 06:10PM
323
November 30, 2016 08:17PM
385
November 30, 2016 08:27PM
374
December 01, 2016 07:36PM
Re: Fast Update
269
December 04, 2016 07:11PM
402
December 04, 2016 09:15PM
308
December 05, 2016 12:06AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.