Table: students
studentid | rollNo | name
Table: classRecord
recordId | studentId | isPresent
students.studentid is the foreign key for classRecord.studentId
I have the value of the rollNo from the students table and also whether he was present in class or not and I want to get the studentid from the students table and insert it into classRecord. I want to first get the value of studentid for a rollNo and then Insert this value of studentid into classRecord table.