I have 3 tables: 'news', 'requirements', 'conditions'. News - basic table. requirements and conditions dependency from 'news' through the consolidated (news_mechanic). How to insert data into all tables at once with a single query. I know, i must use trigger. But, how to do it?
CREATE TABLE news (id_news SERIAL PRIMARY KEY, text_news VARCHAR NULL, date_created date NULL).
CREATE TABLE conditions (id, gender_men boolean NULL, gender_women boolean NULL, age_from INTEGER NULL, age_to INTEGER NULL, etc).
CREATE TABLE requirements (id, name VARCHAR, mechanic_test, mechanic_cunsultation, etc).