Delete Statement with Inner Join

Posted on 2013-06-17
Last Modified: 2013-06-18
I know in SQL its something like this but I just read something and Im curious if I can do this in Oracle? Its a Inner Join on the same table but with different keys

from omni_common_lookup a
inner join omni_common_lookup b on A.LOOKUP_CODE = B.LOOKUP_SUB_TYPE_CODE
where a.lookup_key LIKE 'ALERT_ITEMS_%' and b.lookup_key= 'ALERT_EMP_PEOPLE';

Can this be done in Oracle?

Question by:jknj72
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 35

Accepted Solution

johnsone earned 500 total points
ID: 39254373
DELETE FROM omni_common_lookup a 
WHERE  lookup_keyu LIKE 'ALERT_ITEMS_%' 
                   FROM   omni_common_lookup b 
                   WHERE  a.lookup_code = b.lookup_sub_type_code 
                          AND b.lookup_key = 'ALERT_EMP_PROFILE') 

Open in new window


Author Closing Comment

ID: 39257151

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question