Skip to Content
0
Former Member
May 04, 2016 at 09:45 AM

How to get efficiently values from a table that are not in another table?

4760 Views

Hi experts,

i have 2 database tables TAB1 and TAB2. Both tables have between 3 and 4 millions entries. The goal is to find out all entries in TAB1 that are not in TAB2.

The tables are some common key fields. An easy way to achieve this will be to loop on one internal table with data from TAB1 and then check if an entries is not in TAB2 and add it to a result list. Is there any way to resolve this efficiently. I am taking here about tables with million entries.

Thanks in advance.