I have this below query:
SELECT U.NAME , U.TYPE , U.REFERENCED_NAME , U.REFERENCED_TYPE,
CASE
WHEN U.REFERENCED_TYPE= 'TABLE' and A.TABLE_NAME= U.REFERENCED_NAME
THEN 'TABLE EXISTS'
WHEN U.REFERENCED_TYPE= 'PROCEDURE' and A.TABLE_NAME= U.REFERENCED_NAME
THEN 'PROCEDURE EXISTS'
END
FROM USER_DEPENDENCIES U , user_tables a
WHERE U.name ='RANDOM_PROCEDURE_NAME' and U.REFERENCED_NAME = A.TABLE_NAME;
My problem in this query is this : U.REFERENCED_NAME = A.TABLE_NAME such join is giving ME only the specific condition.I want in table USER_DEPENDENCIES to know the tables that exists even if it doenst exists in table user_tables a. I WANT to include an outer join but I am not capable to do that. can anyone help me with that?