Record duplicity between two tables

Asked

Viewed 34 times

-1

I have two tables that have phone field. I needed to make a query where I searched all the phones equal between these two tables. It is possible?

  • 1

    Yes, just make a Join between them where the values in these columns are equal. Want to try?

  • Presents your tables and the query you are trying for we can help you better.

2 answers

0


Make a Join between the two tables, like the example below:

Select *
from tabela1 
     inner join tabela2 on tabela1.telefone = tabela2.telefone

0

You need to do something like this

    SELECT t1.NumeroTelefone FROM tabelaTelefone1 t1
    INNER JOIN tabelaTelefone2 t2
       ON t1.NumeroTelefone = t2.NumeroTelefone

Browser other questions tagged

You are not signed in. Login or sign up in order to post.