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

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -