select * from tb1 a where =(select min(id2) from tb1 where i

select * from tb1 a where =(select min(id2) from tb1 where id1=a.id1)
其中的a该如何理解?
ahglb 1年前 已收到1个回答 举报

larenzhuanyong1 幼苗

共回答了17个问题采纳率:94.1% 举报

A 为TB1表或视图的别名,这里表示TB1,一般用来在表较多,表名较长,表名有重复时使用.
提取列名时,需加表名前缀时,如表有别名,用别名代替,如这里的A.ID1
select * from tb1 a where =(select min(id2) from tb1 where id1=a.id1)

1年前

2
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 16 q. 0.020 s. - webmaster@yulucn.com