I\'m learning SQL/dbms and using Postgres. I want to return rows that both have a certain value in a certain column. For example in tables Carpets and Curtain
Carpets
Curtain
If you want the result for matching in two table, then try this:
select id from curtains ,carpets where curtain.color = carpets.color;
This will return id where curtain.color = carpets.color
curtain.color = carpets.color