I am beginning to see DB, I am trying to understand how relationships work, the example I am trying to do consists of having a teacher table and a student table;
I want to query the students table, but with teacher data, that is, tell me to select all the students who have "teacherX" as their teacher.
My tables and relationship are like this:
Here I am doing select, but with the id that already contains the student table, what I want to know is how to indicate that, instead of putting the id, put the teacher's name something like ***select * from alumno where id_profesor = (select id from profesor where nombre = Gabriel)***
(I know that I don't know how to write it that way, but I don't I know how to do it).
Here are the records for my 2 tables.