字体:
I am a new guy to IT. Let me try this: [#4134925@0 -ROLIA.NET 相约加拿大网上社区 之 枫下论坛 & 枫下部落, 枫下论坛主坛 ]

I am a new guy to IT. Let me try this:

by registereduser (立牌坊) at 2007.12.20 21:13 (#4134925@0)
As I know, ON should be used as condition for JOIN. WHERE should be condition for SELECT. In your first example, the base formed by JOIN which is used for SELECT should concurrently meet two conditions. The base would be very small.

Your 2nd example, the base would be larger then first one because it only has one condition. However, when execute SELECT, there is an extra condition as stated in WHERE.

The problem is in some system, they do not separate two kinds of condition. Oracle system is a such bad example. I had suggled to separate conditions for JOIN and conditions for SELECT in a relatively complex case.

I think you should not compare the WHERE with AND. You should compare WHERE plus ON with single ON has two conditions within.

Logically, the results should be same. Practically, I had different results too. I could not explain how they are different.

该话题已在历史区内,不能被修改或回复。       收藏    投诉
关闭窗口