I have 2 Tables Here,
CREATE TABLE first (id SERIAL PRIMARY KEY, name STRING);
CREATE TABLE second (
id SERIAL PRIMARY KEY,
CONSTRAINT first_fk FOREIGN KEY (first_id) REFERENCES first(id));
Have also Inserted 1 value each in the tables. They get properly inserted into the DB.
INSERT INTO first(name) VALUES (‘karan’);
INSERT INTO second(“name”, first_id) VALUES (‘second name’, 313800012546375681);
Now, I wanted to update the First Table ‘id’ Column with a new value ie. 500 and wanted that to automatically reflect in the second table as well. Is there any method to be able to do something like this?
Thanks a ton.