早教吧 育儿知识 作业答案 考试题库 百科 知识分享

sql语句中的w、x、y、z是什么啊"selectsname姓名frome191sporterxwherenotexists(select*frome191sporterw,e191gradeywheresname='张三'andw.sno=y.snoandnotexists(select*frome191gradezwherez.sno=x.snoandz.pno=y.pno

题目详情
sql语句中的w、x、y、z是什么啊
"select sname 姓名
from e191_sporter x
where not exists
( select *
from e191_sporter w,e191_grade y
where sname='张三' and w.sno=y.sno
and not exists
( select *
from e191_grade z
where z.sno=x.sno and z.pno=y.pno and x.snow.sno )
)“中的w、x、y、z是什么意思?
▼优质解答
答案和解析
from e191_sporter x --x是e191_sporter的临时表名字,
from e191_sporter w,e191_grade y --w y也是
from e191_grade z
这些可以这样写:from e191_grade as z (其中一个作用就是简化写法)
y.pno 其实就是e191_grade.pno