MySQL Union distinct based on equality predicate -
i have 2 tables have columns "name" "lname" "val" , want union "name" , "lname" unique first table overriding rows of second. union distinct looks want cant make check first 2 rows.
(select a.name, a.lname, a.val a) union (select b.name, b.lname, b.val b left join using(name, lname) a.name null)
Comments
Post a Comment