how to grab the not equal row from joined table in mysql? -
i have 2 tables following
user_job_applied
company_viewed_user
i want take rows not in company_viewed_user table relevant job_id in user_job_applied table. wrote following query it's not grabbed
select `user_job_applied`.user_id `user_job_applied` left join `company_viewed_user` on `company_viewed_user`.user_id on `company_viewed_user`.user_id = `user_job_applied`.user_id `company_viewed_user`.user_id null , `company_viewed_user`.emp_id in (select user_id company_user company_id='1') , `user_job_applied`.job_id = '1';
want move emp_id condition left join statement in clause
select `user_job_applied`.user_id `user_job_applied` left join `company_viewed_user` on `company_viewed_user`.user_id = `user_job_applied`.user_id , `company_viewed_user`.emp_id in (select user_id company_user company_id='1') `company_viewed_user`.user_id null , `user_job_applied`.job_id = '1';
Comments
Post a Comment