Reply to Re: SQL query

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация