View previous topic :: View next topic
|
Author |
Message |
callkris_cit
New User
Joined: 22 Apr 2006 Posts: 44
|
|
|
|
Hi All,
Select * from tablename where 0 = 1. What does it mean?
Regards
Suresh |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Suresh,
It would not fetch any row since 0 never be equal to 1 |
|
Back to top |
|
|
silan
New User
Joined: 16 Jun 2006 Posts: 8 Location: new delhi
|
|
|
|
Hi,
This is a very common technique used for tuning.
0 = 1 predicate is used to influence the access path .
Ex:SELECT CORP_CODE,SALES_OFFICE
FROM TABLE1
WHERE CORP_CODE IN ('10' , '20') OR '0=1';;;;
u can get more on this from Mullins book.
-cheers. |
|
Back to top |
|
|
|