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

drop table if exists

DROP TABLE IF EXISTS 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

if table exists drop

IF EXISTS(SELECT *
          FROM   dbo.Scores)
  DROP TABLE dbo.Scores
Comment

PREVIOUS NEXT
Code Example
Sql :: how to add boolean column in postgresql 
Sql :: sql server read uncommitted 
Sql :: oracle string length 
Sql :: mysql convert timestamp to date 
Sql :: sql search all columns of database oracle sql 
Sql :: mysql drop database if exists 
Sql :: remove accented characters from string sql 
Sql :: how to install psql in ubuntu 
Sql :: log queries postgre 
Sql :: his is incompatible with sql_mode=only_full_group_by 
Sql :: ubuntu stop mysql 
Sql :: sql last row in table 
Sql :: wordpress sql find and replace 
Sql :: open postgress in terminal mac 
Sql :: customer using hdfc bank sql query 
Sql :: sql database size 
Sql :: Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. 
Sql :: [2021-10-05T13:43:48.961Z] error Error: ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: how to update date add hours in postgresql 
Sql :: oracle compile schema 
Sql :: MySql get fields of table 
Sql :: pip install mysqlclient error 
Sql :: alter sequence set current value oracle 
Sql :: what is meant by trigger in dbms 
Sql :: how to see logical reads in sql server 
Sql :: get the rows from two tables whose relation is in 3rd table 
Sql :: oracle sql two left digits 
Sql :: get the mysql table columns data type mysql 
Sql :: oracle nls instance 
Sql :: my sql version 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =