Home  >  Article  >  Database  >  oracle (+) 左关联

oracle (+) 左关联

WBOY
WBOYOriginal
2016-06-07 15:51:131816browse

SELECT a.policyno, a.agentcode, b.agentname FROM prpcmain a, prpdagent b WHERE a.agentcode = b.agentcode(); 相当于: SELECT a.policyno, a.agentcode, b.agentname FROM prpcmain a LEFT JOIN prpdagent b ON a.agentcode = b.agentcode; 表示左关联

SELECT a.policyno, a.agentcode, b.agentname FROM prpcmain a, prpdagent b
WHERE a.agentcode = b.agentcode(+);

相当于:

SELECT a.policyno, a.agentcode, b.agentname FROM prpcmain a
   LEFT JOIN  prpdagent b
   ON a.agentcode = b.agentcode;

表示左关联,即左边表中的数据都有,是以左边表为基础的。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn