Sql – remove ON DELETE CASCADE

altercascadeconstraintssql

I have a child table. and foreign key there with ON DELETE CASCADE while creating the table.

There are no records either in child or parent table.

I want the primary key, foreign key to be as they are but want to remove only the CASCADING option from the child table .

is there anyway that i can Alter that child table.

Thank you.

Best Answer

ON DELETE { NO ACTION | CASCADE | SET NULL | SET DEFAULT }

The default is NO ACTION.

So try altering your child table back to default.