- or download this
create table t1 (
val1 varchar(10) primary key,
...
tmp1 varchar(10) primary key,
tmp2 varchar(10)
)
- or download this
select t1.val2, t2.tmp2
from t1 join t2 on val2=tmp2
- or download this
select t1.val2, t2.tmp2
from t1 join t2 on val1=tmp1