MySQL Forums
Forum List  »  Triggers

Re: Trigger syntax - stop duplicates
Posted by: Phillip Ward
Date: April 10, 2017 05:06AM

An insert creates one or more rows.

A select returns any number of rows.

Concentrate on getting the select to return the data that you want, then leave the the insert to work with those rows.

Your select has no 'where' clause and so will return every row that matches based only on the join criteria you've specified. your insert will dutifully insert all of them, because that's what it does.

Regards, Phill W.

Options: ReplyQuote


Subject
Views
Written By
Posted
609
April 10, 2017 01:04AM
Re: Trigger syntax - stop duplicates
275
April 10, 2017 05: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.