ALTER procedure [dbo].[proc_PostVisitCountInsert](
@postCount bigint,
@postID bigint)
as
Begin
if not exists(select * from PostVisitCount where [email protected])
Begin
Insert into PostVisitCount(postcount,postID) values(@postCount, @postID)
end
else
Begin
--Query for Update PostVisitCount
Declare @count bigint
Set @count=(select postcount from PostVisitCount where [email protected])
Update PostVisitCount set postcount=(@count+1), [email protected]
End
end --Error getting at this place
当我尝试执行查询时,出现这些查询时出错。我不明白这个查询有什么问题,任何人都能帮我弄清楚我做错了什么。关键字'结束'附近的语法不正确。 sql
请张贴整个查询,使一些人可以解析和帮助 – TheGameiswar
你有更新查询吗,还是只有这条评论?开始和结束语句不能为空;声明需要在开始和结束之间。 – steenbergh
@TheGameiswar:我添加更新查询到它不工作显示相同的错误 – user6503334