MySQL Forums :: InnoDB :: Fast Insert Where Not Exist


Advanced Search

Re: Fast Insert Where Not Exist
Posted by: Ferdie Palero ()
Date: December 01, 2016 11:00PM

Hi Peter,

Where I am wrong? it always inserting a row where there are existing records that no need to be inserted.

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


Regards,
FPalero

Options: ReplyQuote


Subject Views Written By Posted
Fast Insert Where Not Exist 379 Ferdie Palero 12/01/2016 07:58PM
Re: Fast Insert Where Not Exist 241 Peter Brawley 12/01/2016 09:01PM
Re: Fast Insert Where Not Exist 225 Ferdie Palero 12/01/2016 11:00PM
Re: Fast Insert Where Not Exist 201 Peter Brawley 12/02/2016 12:08AM
Re: Fast Insert Where Not Exist 211 Ferdie Palero 12/02/2016 12:24AM


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.