Search
 
SCRIPT & CODE EXAMPLE
 

SQL

drop table with constraints

1. 'First Drop contrstraints like this'
ALTER TABLE table_name
DROP CONSTRAINT constraint_name;
2. 'Then drop table'
DROP TABLE table_name;
Comment

DROP TABLes regardless of constraints

SET FOREIGN_KEY_CHECKS = 0;

DROP TABLE <table_name>

-- if you want to later add or modify foreign keys
SET FOREIGN_KEY_CHECKS = 1;
Comment

PREVIOUS NEXT
Code Example
Sql :: sql query duplicate rows 
Sql :: mysql get year from date 
Sql :: calculate distance between two latitude longitude points sql 
Sql :: copy postgres table from one schema into another 
Sql :: laravel get sql query eloquent with parameters 
Sql :: give a column name to values generated from case statement in sql 
Sql :: mysql else if 
Sql :: drop view sql 
Sql :: oracle drop temporary table 
Sql :: mysql select tables with name like 
Sql :: how to connect to xampp sql server on windows cmd 
Sql :: oracle convert int to date 
Sql :: postgresql find duplicates 
Sql :: drop index in sql 
Sql :: postgresql export database 
Sql :: oracle apex debug mode 
Sql :: mysql cdn link 
Sql :: how to change a collumn name in sql 
Sql :: Mysql Create table with foreign keys. 
Sql :: mysql regexp_replace remove html tag 
Sql :: sql pagination offset 
Sql :: mysql compare datetime to another datetime 
Sql :: unsigned int in mysql 
Sql :: how to retrive the today date sql 
Sql :: mysql change default collation 
Sql :: check if has alpha characters sql 
Sql :: sp in sql server 
Sql :: sql count null as 0 
Sql :: show column names in sql table 
Sql :: create database in mysql 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =