-
-
Save LitKnd/618a175c1c1835e44863fd1786b10cd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Trying to reproduce a reported duplicate naming issue in SQL Change Automation */ | |
CREATE TABLE dbo.duplicate (i INT IDENTITY) | |
CREATE TYPE duplicate AS TABLE | |
( i INT ); | |
GO | |
CREATE PROCEDURE dbo.useduplicate | |
@duplicate duplicate READONLY | |
AS | |
SELECT * FROM @duplicate; | |
DECLARE @duplicate2 AS duplicate; | |
INSERT INTO @duplicate2 (i) | |
SELECT 1; | |
GO | |
CREATE TRIGGER tr_duplicate ON dbo.duplicate AFTER INSERT AS | |
BEGIN | |
DELETE FROM dbo.duplicate WHERE 1 = 0 | |
END | |
GO | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment