Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have 4 tables, each with a common field QuestionnaireId.

I am wondering if there is any difference in output or performance difference between using USING on the field in each join or by specifying the ON QuestionnaireId relations between each join.

Case A:

Select * FROM 
    INNER JOIN QuestionnaireScore USING (QuestionnaireScoreId)
    INNER JOIN Questionnaire USING (QuestionnaireScoreId)
    INNER JOIN QuestionnaireScoreTags USING (QuestionnaireScoreId);

Case B:

Select * FROM 
    StudyQuestionnaire SQ
    INNER JOIN QuestionnaireScore QS ON SQ.QuestionnaireScoreId = QS.QuestionnaireScore
    INNER JOIN Questionnaire Q ON QS.QuestionnaireScoreId = Q.QuestionnaireScoreId
    INNER JOIN QuestionnaireScoreTags QST ON Q.QuestionnaireScoreId = QST.QuestionnaireScoreId;
share|improve this question
USING is just shorthand notation. – eroomydna Feb 18 '14 at 17:26
There is a difference in output, if you are using SELECT *. The ON query will show four QuestionnaireScoreId columns, the USING query will show one. – ypercubeᵀᴹ Feb 18 '14 at 17:45
other than number of outputted fields though, the overall joining is the exact same right? Also forgot that they are not all inner joins, some may be left joins. – Raymond Feb 18 '14 at 17:56
Performance wise it's the same – Sam D Feb 18 '14 at 18:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.