Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 9956

An SQL join clause combines records from two or more tables or views.

0 votes
1 answer
225 views

Would it be better to do a sepparate query instead of a left JOIN?

SELECT r.id, r.name, rp.explanation preparation, g.name FROM recipes r LEFT JOIN recipes_preparation rp ON r.id = rp.fk_recipes_id AND rp.in_use = 1 JOIN glassware g ON r.fk_glassware_id … And it looks like it uses ALL as the join type - which is not good since that is a full table scan according to the MySQL Refrence.. …
ThomasK's user avatar
  • 185
0 votes
2 answers
190 views

Is my JOIN syntax not valid? And have I understood JOIN correctly?

FROM table_a a JOIN table_b b ON b.fk_table_a_pk = a.pk JOIN table_c c ON c.fk_table_a_pk = a.pk they're both RIGHT tables relative to table_a? And if I continue like this: .... … JOIN table_c c ON c.fk_table_a_pk = a.pk JOIN table_d ON d.fk_table_c_pk = c.pk now table_c is still RIGHT relative to table_a, but is now also LEFT relative to table_d - and of course then table_d …
ThomasK's user avatar
  • 185