select * from a as ahahahaha
这是设定别名,在多表关联查询的时候用的比较多
比如:
select a.f1 as f1, a.f2 as f2, a.f3 as f3, b.f1 as f4, b.f2 as f5, b.f3 as f6 from ajdfiadjfkjfd as a, bdjfkasdjfkdjfk as b where xxxxxxx
如果不写 as a,就要写很多ajdfiadjfkjfd,除非你愿意写。
另外,这种写法必须用到 as a
select a.f1, b.f2 from (select * from t1) as a, b where xxxxx
这是单纯的sql语句,跟tquery没什么关系。