I have a two tables which insert using jdbc. For example its parcelsTable and filesTableAnd i have some cases:
1. INSERT new row in both tables.
2. INSERT new row only in parcelsTable.
TABLES:
DROP parcelsTable;
CREATE TABLE(
 num serial PRIMARY KEY,
 parcel_name text,
 filestock_id integer
)
DROP filesTable;
CREATE TABLE(
 num serial PRIMARY KEY,
 file_name text,
 files bytea
)
I want to set parcelsTable.filestock_id=filesTable.num when i have INSERT in both tables using TRIGGER.
Its possible? How to know that i insert in both tables?
 
     
     
    