return records with more than one occurrences

From: Tarsis Lima <tarsis(dot)lima(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: return records with more than one occurrences
Date: 2011-01-05 14:18:26
Message-ID: d7cb6a09-b376-4e46-ba2b-3dfe82a90d77@c2g2000yqc.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

how would the SELECT to return only records with more than one
occurrences of id_table1? example:
-- Table1
-- id --
-------------------------
1
2

-- Table2
id --- | id_table1 | name
----------------------------------------------
4 ---- | ----- 1 ------ | Tom
5 ---- | ----- 1 ------ | Luci
6 ---- | ----- 2 ------ | Cleber ------>this can not return

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Good, Thomas 2011-01-05 19:39:10 pattern matching with dates?
Previous Message Gary Stainburn 2011-01-05 10:40:08 Re: foreign key question