sql - Returning rows that has matching record in another table -


I have table students with student ID and student names. I have table events with table id, student ID and event.

Now, I want to write a query that will return only the rows from the student table, in which the student ID is present in the event table.

I'm running MySql 5 +.

Join and besides you you can also use EXISTS

  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -