Help us understand the problem. What is going on with this article?

MySQLでINNER JOINして検索すると便利だなって話

More than 5 years have passed since last update.

studentsテーブルに
id, nameというアトリビュート(カラム)があったとして

student_scoresテーブルに
id, student_id, math, english, chemistry
アトリビュート(カラム)があったとする

select name, math, english, chemistry from student_scores inner join students on student_scores.student_id=students.id where math = 100 && english = 100 && chemistry =100;

これで、生徒テーブルと点数テーブルをひもづけて
全科目100点の生徒の名前を特定できる

ここを参考にした
http://www.pursue.ne.jp/jouhousyo/SQLDoc/select22.html

sgtn
すたーとあっぷえんじにゃー
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away