Last active
March 28, 2018 13:17
-
-
Save shaneis/0509ba3dba46d1887baacc81c8c0b7a5 to your computer and use it in GitHub Desktop.
what what you got does
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
IF OBJECT_ID(N'dbo.WhatYouGot', N'P') IS NOT NULL DROP PROCEDURE dbo.WhatYouGot; | |
GO | |
CREATE PROCEDURE dbo.WhatYouGot | |
AS | |
BEGIN | |
IF OBJECT_ID(N'tempdb.dbo.#temp', N'U') IS NOT NULL DROP TABLE #temp; | |
CREATE TABLE #temp ( | |
id tinyint NOT NULL DEFAULT 1, | |
details varchar(50) NOT NULL DEFAULT 'A head full of stupid ideas :)' | |
); | |
INSERT INTO #temp DEFAULT VALUES; | |
SELECT id, details FROM #temp | |
END; | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment