See i have two table named Studentmaster-rollno,name,permanentaddress1,permanentzipcode
I want to select roll no of a student with permanent address like "chennai" and permannet zipcode=60004 and from second table i have to select dptname,status where status will be like('c','f,,'t','k')
I tried a query as follows
SELECT t1.rollno,t1.firstname,t1.permanentaddress1,t1.Permanentaddress2 ,t1.Permanentzip, t2.departmentcode, t2.status,t2.programid FROM studentmaster t1 INNER JOIN studentacademicdetails t2 ON t1.rollno = t2.rollno where t2.status in('c','f','k','t') and t1.Permanentstate like 'tamil%' and t1.Permanentaddress1 like 'chennai%' and t1.Permanentaddress2 like 'chennai%' and t1.Permanentzip like '600%'
help me out