Mysql – id column in the subquery where clause exists in both tables, the id it is using is from the wrong table
Table tblStudents columns: id, name, gender, SchoolName, SchoolId. Table tblSchool columns: id, name, location. select name, (select name from tblStudents as a where a.SchoolId=id limit 1) from tblSchool; I am looking to return SchoolName along with the first student enrolled…