ALTER TABLE to add ON DELETE CASCADE statement
问题 I want to do the following in PostgreSQL (using Hibernate): ALTER TABLE fruits ADD CONSTRAINTS id ON DELETE CASCADE; Obviously, my code above is not working, so I am looking for the correct statement. If I can't do that, then how about the following: I have a bunch of data in my table fruits . The id field in fruits is used as a foreign key by table grapes . I need to delete a specific row in fruits and I want the deletion to cascade to grapes and delete all entries in grapes that has the