語(yǔ)法含義解讀
select a.user_name, b.skill, c.skill
from user1 as a inner join user_skills as b on a.id = b.user_id and b.skill = '念經(jīng)'
inner join user_skills as c on b.user_id = c.user_id and c.skill = '變化'
where b.skill_level > 0 and c.skill_level > 0;
這個(gè)語(yǔ)法含義能一步一步解讀一下嗎
2018-03-24
首先a與b關(guān)聯(lián)產(chǎn)生結(jié)果集這個(gè)結(jié)果集中滿足的條件的是技能是念經(jīng),然后將這些結(jié)果集與c表關(guān)聯(lián)進(jìn)一步得到技能是變化的結(jié)果集,即這個(gè)SQL語(yǔ)句是為了得到既有念經(jīng)技能又有變化技能的取經(jīng)人
2022-03-30