我想用ANSI JOIN在oracle上做到这一点:
SELECT *
FROM TICKET,
--here I have more tables that relates with TICKET
TICKET_EVO,
USER USR_CLIENT,
USER USR_SUPPORT
WHERE TICKET.ID = TICKET_EVO.ID --TICKET_EVO is child of TICKET
AND TICKET.CD_USER = USR_CLIENT.CD_USER --TICKET has the client user that opened the ticket
AND TICKET_EVO.CD_USER = USR_SUPPORT.CD_USER --TICKET_EVO has the support user that answer the client on each evolution
谢谢!
答案 0 :(得分:0)
SELECT *
FROM TICKET
JOIN TICKET_EVO
ON TICKET.ID = TICKET_EVO.ID
JOIN USER USR_CLIENT
ON TICKET.CD_USER = USR_CLIENT.CD_USER
JOIN USER USR_SUPPORT
on TICKET_EVO.CD_USER = USR_SUPPORT.CD_USER