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
LVL 34

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
possible to record changes (trigger I think) msql 11 34
SQL Server syntax question 13 30
Query still returning duplicates 5 27
sql server insert 12 29
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now