HI
For improving performance in your query we should not use "not in" . So how can we avoid not in?
consider a situation there are two tables t1,t2 both having a common column called "book Name". if you want to get book name from t1 but those name should not being in t2 table then we should writ our query like the following
Good practice
-----------------
SELECT t1.bookname
FROM t1
LEFT OUTER JOIN t2
ON t1.bookname= t2.bookname
WHERE t2.bookname IS NULL
Bad Practice
-----------------
select t1.bookname from t1 where t1.bookname not in(select t1.bookname from t2)
Thanks
saranpselvam@gmail.com saran