Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql drop table if exists

DROP TABLE IF EXISTS dbo.Customers
Comment

sql server drop table if exists

IF OBJECT_ID('dbo.Scores', 'U') IS NOT NULL DROP TABLE dbo.Scores; 
Comment

SQL DROP TABLE IF EXISTS

DROP TABLE IF EXISTS my_table;
Comment

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
Comment

sql server drop table if exists

-- Classic table
IF OBJECT_ID('my_schema.my_table', 'U') IS NOT NULL DROP TABLE my_schema.my_table; 
-- Temporary table
IF OBJECT_ID('tempdb.my_schema.#my_table') IS NOT NULL DROP TABLE #my_table; 
Comment

sql drop table if exists

IF OBJECT_ID('dbo.Scores', 'U') IS NOT NULL 
  DROP TABLE dbo.Scores; 
Comment

PREVIOUS NEXT
Code Example
Sql :: delete all value query 
Sql :: oracle revoke 
Sql :: how to copy data in sql 
Sql :: oracle get running queries 
Sql :: sql convert varchar to date 
Sql :: add primary key with auto increment to existing table column mysql 
Sql :: excel export from sql using python 
Sql :: mariadb hours between two dates 
Sql :: postgres regular expression replace 
Sql :: copy value from one column to another postgres 
Sql :: sql server case sensitive search 
Sql :: SQL Error 1040 : Too many connections 
Sql :: desc in sql 
Sql :: The local psql command could not be located 
Sql :: postgresql Create a new role with a username and password 
Sql :: output table plsql 
Sql :: sql now 
Sql :: update con select postgresql 
Sql :: import sql in postgresql 
Sql :: add multiple row table pl sql 
Sql :: mysql login to a specific database terminal 
Sql :: mysql run sql file 
Sql :: division by zero postgres 
Sql :: default number in sql 
Sql :: create temp table in sql 
Sql :: sql cnvert bit to nvarchar 
Sql :: pagination in sql 
Sql :: select random rows sql 
Sql :: sql find second highest salary employee 
Sql :: uppercase sql 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =