Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

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

We have a table that has the primary key as a auto increment called unique_id, the table has a account number that is set as a foreign key to another table.

For some reason the program was not checking when account numbers are entered to see if that account number was already used, which will be fixed.

The issue is a user entered a new account with a account number already being used.

I now need to figure out how to safely remove the account they entered, when I try to run a sql delete statement to remove it I get the error.

Is there a save way to delete the record so it is no longer in the table, I am using the primary key unique_id for the record in the where statement to delete it.

When the query runs I get this:  Cannot delete or update a parent row: a foreign key constraint fails

  Discussion posts and replies are publicly visible