-4
Hello, I’d like to know how you belt a field that you don’t have on another table. logically would be so "selects document code in table x where document code does not exist in table y ";
-4
Hello, I’d like to know how you belt a field that you don’t have on another table. logically would be so "selects document code in table x where document code does not exist in table y ";
0
whereas the tables are x and y, as mentioned, and that both have the Cpf, for example, the following query returns all existing Cpfs in x that do not exist in y:
SELECT
cpf
FROM
x
WHERE
cpf NOT IN (SELECT cpf FROM y)
And the following, all the numbers that exist in y but not in x:
SELECT
cpf
FROM
y
WHERE
cpf NOT IN (SELECT cpf FROM x)
The comparison criterion(s) (here CPF was used) is you who will have to define, based on one/some of the columns simultaneously existing in the two tables.
I was busy these days but thanks for the tip, it worked
Browser other questions tagged sql pl-sql
You are not signed in. Login or sign up in order to post.
I could understand anything you wrote. It has how to edit your question and write correctly?
– Woss
It would be something like: Not IN or Not EXISTS which to use?
– Marconi