sql - Why is "AS emp" needed in this query -
select top 1 salary ( select top 3 salary employees order salary desc) emp order salary asc why "as emp" used in query? query not work without using as.
the reason because need alias subquery. think of subquery creating table select , query trying reference it. might not going on, helps me justify why have add alias @ end.
Comments
Post a Comment