为什么我在这里select top @recNo
收到语法错误?
create procedure getTopAccounts
(
@recNo int
)
as
begin
select top 1 accDesc, accNum
from
(select top @recNo accDesc,accNum
from
ACCOUNTS_TABLE
order by
accNum desc)
as a order by accNum
end