Files
linguist/samples/SQL/object-update.udf
2014-04-22 10:34:19 +02:00

9 lines
230 B
SQL

if not exists(select * from sysobjects where name = '%object_name%' and type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
exec('create FUNCTION dbo.%object_name%() returns int as begin return null end')
GO
%object_ddl%
go