哪个查询更好?
1.
SELECT awardCateg.ID,
awardCateg.DESCRIPTION,
awardCateg.FREQUENCY_ID,
freq.ID,
freq.DESCRIPTION
FROM AWARD_CATEGORY awardCateg
INNER JOIN FREQUENCY freq ON awardCateg.FREQUENCY_ID=freq.ID
2.
SELECT awardCateg.ID,
awardCateg.DESCRIPTION,
awardCateg.FREQUENCY_ID,
freq.ID,
freq.DESCRIPTION
FROM AWARD_CATEGORY awardCateg,
FREQUENCY freq
WHERE awardCateg.FREQUENCY_ID=freq.ID
AWARD_CATEGORY:
ID FREQUENCY_ID DESCRIPTION
6 1 Spark of the month
7 2 Best Mentor of the quarter
9 3 Best Associate
10 3 Leadership Award
FREQUENCY:
ID DESCRIPTION
1 Monthly
2 Quarterly
3 Annual
Expected result:
ID DESCRIPTION FREQUENCY_ID ID DESCRIPTION
6 Oscar of the month 1 1 Monthly
7 Catalyst of the quarter 2 2 Quarterly
9 Best of the Best 3 3 Annual
10 Leadership Award 3 3 Annual