What does (+) mean in SQL?
What does the (+) mean in the Where Clauses in this SQL statement?
SELECT p.FIRSTNAME,
p.LASTNAME,
p.LOGINNAME,
a.DESCRIPTION,
a.PERIPHERALNUMBER,
a.SUPERVISORAGENT,
t.ENTERPRISENAME,
t.DIALEDNUMBERID,
sp.FIRSTNAME AS SUPER_FIRSTNAME,
sp.LASTNAME AS SUPER_LASTNAME,
sp.LOGINNAME AS SUPER_LOGINNAME,
sa.PERIPHERALNUMBER AS SUPER_PERIPHERALNUMBER,
sa.SUPERVISORAGENT AS SUPER_SUPERVISORAGENT,
a.SKILLTARGETID,
a.PERSONID,
t.AGENTTEAMID,
sa.SKILLTARGETID AS SUPER_SKILLTARGETID,
sa.PERSONID AS SUPER_PERSONID
FROM C2O.AGENT a,
C2O.PERSON p,
C2O.AGENT_TEAM_MEMBER tm,
C2O.AGENT_TEAM t,
C2O.AGENT sa,
C2O.PERSON sp
WHERE a.PERSONID = p.PERSONID
AND a.SKILLTARGETID = tm.SKILLTARGETID(+)
AND tm.AGENTTEAMID = t.AGENTT开发者_如何转开发EAMID(+)
AND t.PRISUPERVISORSKILLTARGETID = sa.SKILLTARGETID(+)
AND sa.PERSONID = sp.PERSONID(+)
AND a.DELETED = 'N'
AND p.LOGINENABLED = 'Y'
AND SUBSTR(a.PERIPHERALNUMBER,2,3) = 580;
In Oracle SQL, this is the deprecated outer join operator.
In Oracle, the (+) specifies that the join is an outer join (instead of an inner join as this implicit join syntax usually implies).
Making it an outer join means that the row should be included in the results even if that particular item is null.
In old Oracle versions, this means an OUTER JOIN.
It is an outer join operator in sql server it would be *=
and =*
精彩评论