I would like to use this in my tables to delete any referenced information.  I have a poll table with a pollComments table.  When I delete a poll, I want the comments related to it to delete also.  The create table works until I add the ON CASCADING DELETE.  Here are the two tables, any thoughts?:

create table fsnep_polls (
    p_id NUMBER Primary Key,
p_date_added date,
p_date_last_used date,
p_question VARCHAR2(400),
p_status NUMBER
)

create table fsnep_pollComments (
    pc_id NUMBER Primary Key,
pc_date_added date,
pc_poll_id NUMBER REFERENCES fsnep_polls(p_id),
pc_comment VARCHAR2(3000),
pc_ip VARCHAR2(20)
ON DELETE CASCADE
)

thanks.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to