> Select * from table where ordereid not in

> (select ordereid from table where status = 0)

> Is the absolute first thing that comes to mind. I'm sure
> some better and
> more efficient ideas will come through though.

Now that you mention it, this is a good point Ken.

Yea, this works similarly to the where exists () subquery. The
advantage of using where exists () is that it's more efficient. Where
not in will scan the entire table regardless of the results, whereas
the where not exists () will stop scanning the table when it finds an
existing record and immediately throw the resultant row away.

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to