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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -