SELECT *
FROM classroom
INNER JOIN classroom_detail ON classroom.classroomid = classroom_detail.classroomid
WHERE classroom.classroomid = " & roomidch &"
ORDER BY classroom.classroomid
หรือว่าต้องการหาจากหมดทุกตัว
Code (VB.NET)
SELECT *
FROM classroom
INNER JOIN classroom_detail ON classroom.classroomid = classroom_detail.classroomid
WHERE classroom.classroomid = " & roomidch &" AND classroom_detail.dayid = " & dayodch & "
AND classroom.syinfoid = " & yearlnfoch & " AND classroom_detail.periodid = " & periodIdch &
ORDER BY classroom.classroomid