|
Posted by frank m via SQLMonster.com on 07/13/05 11:09
Thanks for your reply. Would this not cause problems with large tables and
more than 2 c values? My table could contain a million records with up to 10
c values!
AK wrote:
>create table t(n int, c char(2))
>insert into t values(1, 'A')
>insert into t values(1, 'B')
>insert into t values(2, 'A')
>insert into t values(3, 'A')
>insert into t values(3, 'B')
>select a.n from t a, t b
>where a.n = b.n
>and a.c='A' and b.c='B'
>
>n
>-----------
>1
>3
>
>drop table t
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-general/200507/1
Navigation:
[Reply to this message]
|