1. 别名主要是为了简单标注一个表,在多表查询的情况下,如果表的名称比较长,多个表中存在相同的字段,那么为了简单标注不同的表的相同栏位,所以添加了别名. 例如: select a.*,b.* from thisisatesttestAAA a, thisisanothertestBBB b where a.id = b.id -- 如果不适用别名的话 select thisisatesttestAAA.* ,thisisanothertestBBB.* from thisisatesttestAAA ,thisisanothertestBBB where thisisatesttestAAA.id = thisisanothertestBBB.id 2. as 可又可无.
as 是可有可无--------------------- delete from score where xuebao in (select xuebao from student)
例如: select a.*,b.* from thisisatesttestAAA a, thisisanothertestBBB b where a.id = b.id
-- 如果不适用别名的话
select thisisatesttestAAA.* ,thisisanothertestBBB.* from thisisatesttestAAA ,thisisanothertestBBB where thisisatesttestAAA.id = thisisanothertestBBB.id 2. as 可又可无.
delete from score where xuebao in
(select xuebao from student)