Answers for "tsql drop if exists"

SQL
4

table drop if exist sql server

IF OBJECT_ID('dbo.Scores', 'U') IS NOT NULL DROP TABLE dbo.Scores;
Posted by: Guest on April-22-2020
1

t-sql drop function if exists

IF EXISTS (
    SELECT * FROM sysobjects WHERE id = object_id(N'function_name') 
    AND xtype IN (N'FN', N'IF', N'TF')
)
    DROP FUNCTION function_name
GO
Posted by: Guest on November-19-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language