Search
 
SCRIPT & CODE EXAMPLE
 

SQL

cannot truncate a table referenced in a foreign key constraint

SET FOREIGN_KEY_CHECKS = 0; 
TRUNCATE table $table_name; 
SET FOREIGN_KEY_CHECKS = 1;
Comment

PREVIOUS NEXT
Code Example
Sql :: guid to string sql 
Sql :: mysql now format 
Sql :: installing mysql 
Sql :: oracle get table schema 
Sql :: oracle create directory 
Sql :: forgot mysql root password stackoverflow 
Sql :: sql add column after another 
Sql :: mysql group_concat distinct 
Sql :: pl sql output 
Sql :: refresh postgres config 
Sql :: mysql dump all databases 
Sql :: how to edit table name in mysql 
Sql :: sql server find table name 
Sql :: query to list all tables in sql database 
Sql :: oracle kill session 
Sql :: postgresql change column type 
Sql :: mysql get longest string in column 
Sql :: search stored procedures by name 
Sql :: psql filed name alter 
Sql :: truncate table mysql 
Sql :: sql database size 
Sql :: restart mysql server ubuntu 
Sql :: mysql remove foreign key constraint 
Sql :: t-sql test if table exists 
Sql :: oracle sleep 1 second 
Sql :: create schema postgres 
Sql :: ORACLE RIGHT TWO DIGITS 
Sql :: day of the week sqlite 
Sql :: sql find column name like 
Sql :: create email address from first and last name in sql 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =