MySQL delete multiple rows in one query conditions unique to each row
You were very close, you can use this: Please see this fiddle.
You were very close, you can use this: Please see this fiddle.
As the error message tells you – you can not have two rows with the same value in the columns dementia_type, snapid since they need to be unique. You have to make sure that the two databases has the same values for dementia_type, snapid. A workaround would be to add a column to your table alter table t_types_of_dementia add … Read more
It’s because the name column on the bar table does not have the UNIQUE constraint. So imagine you have 2 rows on the bar table that contain the name ‘ams’ and you insert a row on baz with ‘ams’ on bar_fk, which row on bar would it be referring since there are two rows matching?