我编写了以下存储过程:
ALTER PROCEDURE [dbo].[spLinkAssetToModule]
( -- Add the parameters for the stored procedure here
@Module_ID int,
@Asset_ID int
)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
Insert Into [dbo].[Modules_Assets_Link] (Modules_ID, Assets_ID, DateCreated)
VALUES (@Module_ID, @Asset_ID, GETDATE());
END
当我点击“保存”时,它给了我“无效的对象名称'dbo.spLinkAssetToModule'”错误。有谁知道原因?它与访问权限有关吗?
答案 0 :(得分:2)
使用CREATE PROCEDURE
创建存储过程,而不是ALTER PROCEDURE
。