How to find records from table which are not present in the another table in MYSQL

Finding the data from Table A which are not present in table B.

For This we user WHERE NOT EXISTS. 

  1. SELECT Column FROM Table 1 WHERE NOT EXISTS (SELECT COLUMN FROM  TABLE 2 WHERE TABLE1.Column = TABLE2. Column )  

Example :- 

  1. SELECT *  
  2. FROM student_master   
  3. WHERE NOT EXISTS(SELECT * FROM student_choice WHERE student_master.student_scolar_no = student_choice.student_scholar_no )  


Please Share this course

It Looks like you have completed your course!! We have created Online series based on the above content. You can give a test and check your skill.




Be a Part of CollegeSpike by giving your precious comment here and help us in improving our content.