SQL server 2005存储过程
下面存储过程执行时,出现错误:消息208,级别16,状态6,过程SP_InsertTable,第7行Invalidobjectname'dbo.SP_InsertTabl...
下面存储过程执行时,出现错误:消息 208,级别 16,状态 6,过程 SP_InsertTable,第 7 行
Invalid object name 'dbo.SP_InsertTable'.
USE [Mydata]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[SP_InsertTable]
@tableName varchar(20),
@date nvarchar(10),
@time nvarchar(10)
AS
BEGIN
exec('insert into '+@tableName+'(Date,Time)values('+@date+','+@time+')
')
END 展开
Invalid object name 'dbo.SP_InsertTable'.
USE [Mydata]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[SP_InsertTable]
@tableName varchar(20),
@date nvarchar(10),
@time nvarchar(10)
AS
BEGIN
exec('insert into '+@tableName+'(Date,Time)values('+@date+','+@time+')
')
END 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询