database - how to get Intersection of two query in mysql -


i have table has 2 column 2 foreign key 2 different table.

this relation table:

table

i want select student can speak both language id 3 , 4.

how can wrote query give me e.x 12 , 14

assume relation named "my-relation":

 select r1.student_id my-relation r1 join my-relation r2 on r1.student_id = r2.student_id r1.language_id = '3' , r2.language_id = '4' 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -