这是第一次在sql server上工作。我在“END”处收到错误,因为“END 附近的语法不正确”。假设如果我删除“限制 20”,它不是播种错误。我该如何解决。我的过程:
ALTER PROCEDURE [dbo].[GettotalApps]
AS
BEGIN
SET XACT_ABORT ON
SET NOCOUNT ON
SELECT
v.appId,
v.Description,
(SELECT COUNT(appidorchannelid)
FROM ratings r
WHERE r.AppIdOrChannelId = v.channelid) AS Channelvotes
FROM
apps v
WHERE
v.ChannelStatusId = 1
AND v.IsChannelPrivate = 0
ORDER BY
SubscriberCount DESC
limit 20
END