Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql cannot delete or update a parent row

# THIS SHOULD ONLY BE USED AS A LAST RESORT
SET FOREIGN_KEY_CHECKS=0; -- to disable them
SET FOREIGN_KEY_CHECKS=1; -- to re-enable them
Comment

mysql - Cannot delete or update a parent row: a foreign key constraint fails

ALTER TABLE `advertisers`
  ADD CONSTRAINT `advertisers_ibfk_1` FOREIGN KEY (`advertiser_id`) 
      REFERENCES `jobs` (`advertiser_id`);
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql remove foreign key constraint 
Sql :: how to get last row of table in sql 
Sql :: postgres restart id 
Sql :: postgres select from last 3 months 
Sql :: sql padd let with zeros 
Sql :: postgres read table structure 
Sql :: oracle compile schema 
Sql :: select dba users oracle 
Sql :: how to get current date in mysql 
Sql :: grant permission in postgres 
Sql :: Sql query to force the database to be drop 
Sql :: mysql created at yesterdau 
Sql :: how to add auto increment primary key 
Sql :: extract month from date sql two digits 
Sql :: postgres drop column if exists 
Sql :: sqlite3 how to get column names of a table 
Sql :: sql reset auto increment 
Sql :: psql autocomplete for mac brew install 
Sql :: sql current_timestamp 
Sql :: oracle kill session by sql_id 
Sql :: mysql remove definers 
Sql :: list all tables and columns in postgresql 
Sql :: how to connect mysql with specify port thorugh cmd 
Sql :: how to get ddl for materialized view 
Sql :: group by 15 minute interval sql server 
Sql :: mysql int range 
Sql :: get all table names in sql 
Sql :: oracle current sequence value 
Sql :: view linked servers 
Sql :: mysql number format 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =