Answers for "ms sql server drop if exists"

SQL
4

sql server drop table if exists

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 "ms sql server drop if exists"

Code answers related to "SQL"

Browse Popular Code Answers by Language