1
存储过程是这样的意思工程什么是换行的一个SQL Server存储过程
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[AllotTectOnBay]
@date datetime,
@AddTech [dbo].[AddTechnicianBayallotment] READONLY
AS
BEGIN
SET NOCOUNT ON;
begin try
begin transaction
commit transaction
end try
BEGIN CATCH
rollback transaction;
declare @ErrorMessage nvarchar(max), @ErrorSeverity int, @ErrorState int;
select
@ErrorMessage = ERROR_MESSAGE() + '' Line '' + cast (ERROR_LINE() as nvarchar(5)),
@ErrorSeverity = ERROR_SEVERITY(),
@ErrorState = ERROR_STATE();
raiserror (@ErrorMessage, @ErrorSeverity, @ErrorState);
END CATCH
END
GO
但是,当我把一切都在一行它不工作。为什么? SQL Server是否有类似于行结束的内容;在C#中?
尝试在将所有内容放入一行之前使用GO分隔命令 –