Search
 
SCRIPT & CODE EXAMPLE
 

SQL

Syntax error or access violation: 1701 Cannot truncate a table referenced in a foreign key constraint

As the error says, you can not truncate tables referenced by foreign keys. 
Delete should work though...

DB::table('some_table')->delete();
Comment

PREVIOUS NEXT
Code Example
Sql :: how to delete all duplicate items in mysql 
Sql :: how to count the number of rows in sql 
Sql :: sql where time stamp is in between 
Sql :: restore backup mysql .gz 
Sql :: how to write uppercase in sql 
Sql :: to_char oracle 
Sql :: sql query to select data between two dates 
Sql :: sql pass table name as variable 
Sql :: mysql select row max date 
Sql :: insert array into mysql column 
Sql :: Cannot truncate a table referenced in a foreign key constraint (`video_clips`.`channel_clips`, CONSTRAINT `clips_fk` FOREIGN KEY (`clip_id`) REFERENCES `video_clips`.`clips` (`id`)) in sql] 
Sql :: SQL Copy to Another Database 
Sql :: create function in sql 
Sql :: python mysql create table if not exists 
Sql :: how to tun mysql on ubunto 
Sql :: postgressum when 
Sql :: sql inserted 
Sql :: pl sql create table from another table 
Sql :: truncate your answer to decimal places mysql 
Sql :: sql where contains part of string 
Sql :: oracle ddl 
Sql :: how to casting data types in postgresql 
Sql :: SQL COUNT() with GROUP BY 
Sql :: sql unique select 
Sql :: duplicate record mysql 
Sql :: SQL SELECT TOP Equivalent in MySQL 
Sql :: postgresql where and 
Sql :: graphql 
Sql :: change password in mysql 
Sql :: mysql nested query 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =