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分隔命令 –