Created
September 6, 2018 08:36
-
-
Save matt40k/f1793ecc7e20738ebf5c0d7425e2a4ca to your computer and use it in GitHub Desktop.
Demo code for the DROP TABLE IF EXISTS "bug"
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
DROP TABLE IF EXISTS dbo.ObjectFormerlyATable; | |
CREATE TABLE dbo.ObjectFormerlyATable | |
( | |
ID INT IDENTITY(1,1) NOT NULL | |
CONSTRAINT PK_dbo_ObjectFormerlyATable PRIMARY KEY CLUSTERED (ID ASC) | |
); | |
INSERT INTO dbo.ObjectFormerlyATable DEFAULT VALUES; | |
SELECT ID FROM dbo.ObjectFormerlyATable; | |
DROP TABLE IF EXISTS dbo.ObjectFormerlyATable; | |
GO | |
CREATE OR ALTER VIEW dbo.ObjectFormerlyATable | |
AS | |
SELECT | |
ID=1 | |
; | |
GO | |
SELECT ID FROM dbo.ObjectFormerlyATable; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment