Question about Joins
Posted on 2005-04-24
This question is kind of a two parter, but since they are related I'll section them off for ease of readability.
1) I have never once used Inner Joins or Outer Joins, I learned mySQL by just looking at code, and trial and error. I have always done my queries like so:
select * from question q, answer a where q.questionNumber="&questionNumber&" and q.quizId ="&quizNumber&" and q.questionVersion = "&questionVersion&" and q.questionid = a.questionid"
I take it the q.questionid = a.questionid part is a Join, right? If so or if not, what is the difference between this and using Inner/Outer Joins?
2) I use SqlYog now so it takes care of the relationship code for me...but I remember back in the day when I took my Database Admin. class in college, we had to create a relationship first, via sql code Create Relationship or something like that, without the benefit of a tool like SqlYog. Will my above code sample work without creating a relationship, or is that what Joins are for, to create a query without creating a relationship?