I'm working on my project for simple forum. For storing the datas i've database schema as:
To view the questions posted by the users easier i've created a view as
create view users_questions as select qid,username,questions from userinfo natural
join posts natural join questions
I am trying to create a trigger on that view to insert the data actually inserted into the table questions and post. I have basic knowledge on creating the trigger for tables[Had knowledge of trigger to backup the table rows when deleted]. But confused in case of the views, weather the instead trigger can be used in case of views to insert the data's into other tables.
Edited With My Try For Creating The Trigger
CREATE OR REPLACE TRIGGER TRIGGER1
INSTEAD OF INSERT ON USERS_QUESTIONS
BEGIN
insert into questions values(new.qid,new.questions);
END;
Not working shows error like:
Error(4,5): PL/SQL: SQL Statement ignored Error(4,46): PL/SQL:
ORA-00984: column not allowed here

NATURAL JOIN, as it makes it very difficult to determine what the join conditions are. Always state the join conditions explicitly so that everyone can see them. And always include a field list on yourINSERTstatements - that way yourINSERTs will either still work after the table is modified, or you'll be able to easily find the statements which need to be updated. Best of luck.