You are here: Re: Limitations in a query !! « MsSQL Server « IT news, forums, messages
Re: Limitations in a query !!

Posted by Erland Sommarskog on 10/02/47 11:54

(harsha.21aug@gmail.com) writes:
> I'm a newbee to this forum. I've a question, is there any limitation
> on "IN" clause in select query.
> for example :
> "SELECT EMP_ID, EMP_NAME FROM EMPLOYEE WHERE EMP_ID IN
> ('EMP1001','EMP1002','EMP1003', etc, etc, so on)".


To add to Roy's response, be aware of that when the list grows very
long (> 1000 elements) compile times on SQL 2000 can be absymal. SQL 2005
appears to do better in this regard.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this 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

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