简体   繁体   中英

Duplicates in right outer join

Please help me on fixing the query below,

select id, descr from table1 a
right join table2 b
on a.id = b.id

the descr has been populating null and duplicates. How to get rid of this duplicates in future?

使用不同的键,它将获取唯一的唯一键,如果您使用右连接和左连接,如果内容不存在,它将为空,因此仅使用连接。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM