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
752
November 30, 2016 06:10PM
375
November 30, 2016 08:17PM
426
November 30, 2016 08:27PM
416
December 01, 2016 07:36PM
Re: Fast Update
303
December 04, 2016 07:11PM
428
December 04, 2016 09:15PM
341
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.