Ankit  Shukla

Ankit Shukla

  • NA
  • 681
  • 117.6k

confusion in except and not in keywords

Jul 21 2020 1:43 AM
Hello All,
 
I am using 2 queries:
 
1.  
select FIR_REG_NUM from t_declare_reward where FIR_REG_NUM not in(Select FIR_REG_NUM from  t_arrest_memo)
 
2.
select FIR_REG_NUM from t_declare_reward
except
select FIR_REG_NUM from t_arrest_memo 
 
2nd query returns  some rows, and its right. but I don't understand , why 1st query returns 0 rows.
Output should be come same from both queries.But 1st query gives wrong output.
 
Please clear.
 
Thanks in advance.
 

Answers (1)