text: ﻿IF OBJECT_ID(N'REL_MagicTitle', N'U') IS NOT NULL
  BEGIN
  BEGIN TRY
  	BEGIN TRANSACTION
  		DELETE REL_MagicTitle
  	COMMIT TRANSACTION
  	SELECT
  		@@rowcount
  END TRY
  BEGIN CATCH
  	IF XACT_STATE() <> 0
  	BEGIN
  		ROLLBACK TRANSACTION
  	END
  	SELECT
  		-ERROR_NUMBER()
  END CATCH;
  END
  ELSE
  BEGIN
  	SELECT
  		0
  END