how get data from database if id not found then search another column

Solutions on MaxInterview for how get data from database if id not found then search another column by the best coders in the world

showing results for - "how get data from database if id not found then search another column"
Mahe
24 Feb 2017
1SELECT ID, Name 
2FROM   Table1 
3WHERE  ID NOT IN (SELECT ID FROM Table2)