English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

1 answers

Given two tables (Table1 and Table2), you would count the number elements from the second table and use it in a HAVING clause.

SELECT Table1.ID
FROM Table1 INNER JOIN Table2 ON Table1.ID = Table2.ID
GROUP BY ID
HAVING Count(ForeignValue)>1));

2007-03-06 14:59:19 · answer #1 · answered by Math Guy 4 · 0 0

fedest.com, questions and answers