Oracle SQL : Retrieving non-existing values from IN clause

前端 未结 5 1538
孤独总比滥情好
孤独总比滥情好 2021-01-23 16:00

Having following query:

select table_name
from user_tables
where table_name in (\'A\',\'B\',\'C\',\'D\',\'E\',\'F\');

Assuming only user_tables

5条回答
  •  感动是毒
    2021-01-23 16:53

    if you have list of all those tables to be checked in Table1 then you can use NOT EXISTS clause

    select name
    from Table1 T1
    where not exists ( select 1 from  
                       user_tables U
                       where T1.name = U.table_name)
    

提交回复
热议问题