Created
July 1, 2015 15:27
-
-
Save ststeiger/4519e5ffe282cb742252 to your computer and use it in GitHub Desktop.
Get empty GUID
This file contains hidden or 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 EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[NUID]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')) | |
| DROP FUNCTION [dbo].[NUID] | |
| GO | |
| CREATE FUNCTION [dbo].[NUID]() | |
| RETURNS uniqueidentifier | |
| AS | |
| BEGIN | |
| RETURN CAST('00000000-0000-0000-0000-000000000000' AS uniqueidentifier) | |
| END | |
| GO | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment