Why use the IN operator? The advantages are

  • When you are working with long lists of valid options, the IN operator syntax is far cleaner and easier to read.

  • The order of evaluation is easier to manage when IN is used (as there will be fewer operators used).

  • IN operators almost always execute more quickly than lists of OR operators.

  • The biggest advantage of IN is that the IN operator can contain another SELECT statement, enabling you to build highly dynamic WHERE clauses.

posted on 2009-03-13 18:48  AlexusLi  阅读(228)  评论(0编辑  收藏  举报