tags:

views:

36

answers:

3

If I write a sql query for mysql and I just specify JOIN (no outer, inner, left, etc), what type of join does this default to?

For example:

SELECT count(*) FROM Students p JOIN Classes c ON p.studentId = c.studentId

+1  A: 

Most commonly, INNER JOIN is regarded as the default.

Scott Anderson
A: 

JOIN defaults to INNER JOIN

MikeG
+1  A: 

According to the MySQL manual, the word inner (or cross) is optional, indicating that the default is an inner join.

Ken
I looked for it, but I guess I must have missed it in my skimming. Thanks!
tau-neutrino