Skip to Content
0
Former Member
Apr 25, 2007 at 03:45 AM

Difference between IN and inner OR in SQL

8 Views

Hi,

I need to know what's the difference between using IN and an inner OR in SQL statements.

I need to know their affect on the load of database server and the application server.

Hope someone can help me. Thanks.

For using Inner OR:

SELECT *

FROM SFLIGHT

INTO SFLIGHT_WA

WHERE CARRID = 'LH'

AND ( CONNID = '0300' OR

CONNID = '0302' )

AND FLDATE LIKE '2003%'.

ENDSELECT.

For using IN operator:

SELECT *

FROM SFLIGHT

INTO SFLIGHT_WA

WHERE CARRID = 'LH'

AND CONNID IN ('0300', '0302')

AND FLDATE LIKE '2003%'.

ENDSELECT.