declare @InsertSQL nvarchar(MAX); set @InsertSQL = N'Insert Into dbo.['+@tableName+N'](ParentID,SourceID,NickName,Content,IP,City,BeFiltered,[Disable]) values (@ParentID,@SourceID,@NickName,@Content,@IP,@City,@BeFiltered,@Disable);select @InsertedID = SCOPE_IDENTITY();'; exec sp_executesql @InsertSQL, '@ParentID int,@SourceID int,@NickName nvarchar(20),@Content nvarchar(300),@IP nvarchar(30),@City nvarchar(30),@BeFiltered bit,@Disable bit,@InsertedID int output', @ParentID, @SourceID, @NickName, @Content, @IP, @City, @BeFiltered, @Disable, @InsertedID output;
慕姐8265434
猛跑小猪
相关分类