MySQL Forums
Forum List  »  General

Re: On update doesn't work
Posted by: Jose Maria Cañas
Date: September 08, 2021 03:29AM

This is my problem

If I write this sql query

UPDATE `grupos` SET `id_grupo` = '5' WHERE `id_grupo` = 3

SQL answer:

#1451 - Cannot delete or update a parent row: a foreign key constraint fails (`dbs780743`.`grupos`, CONSTRAINT `grupos_ibfk_1` FOREIGN KEY (`prueba`) REFERENCES `grupos` (`id_grupo`) ON DELETE SET NULL ON UPDATE CASCADE)

Options: ReplyQuote

Written By
September 07, 2021 01:23PM
September 07, 2021 02:49PM
September 08, 2021 03:18AM
Re: On update doesn't work
September 08, 2021 03:29AM
September 08, 2021 08:46AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.