If function not exist then create function in SQL server
0
votes
2
answers
5084
views
If not Exists (Select * from sys.objects where name ='FNLX_getDate' and type =N'FN')
Create function [dbo].[FNLX_getDate]() returns Datetime
as
Begin
.................
End
When I execute the above script I get the error
> Incorrect syntax near the keyword 'function'.
What can be wrong?
Using Microsoft SQL Server to execute above script.
Asked by Nikhil D
(111 rep)
Dec 20, 2016, 09:36 AM
Last activity: Mar 14, 2025, 01:30 PM
Last activity: Mar 14, 2025, 01:30 PM