August 2, 2011 at 12:48 pm
create table test1 (col1 varchar2(10), col2 number)
create table test2 (col3 number, time date)
create table test2_audit (col4 number, col5 number)
insert into test1 values(’test’,1)
I have 3 tables :
I have a data in test2 table
during insertion of test1 table , col1 value of test1 table should be insert into col4 value of test_audit table and
col3 value of test2 table should be insert into col5 value of test_audit table using triggers
select * from test1_audit
Thanks in Advance.
Regards,
Geetha.
August 2, 2011 at 12:53 pm
That seems clear enough. So where do you need help, other than us doing all the work for you, free?
August 2, 2011 at 1:06 pm
during insertion of test1 table, automatically insert the values into test_audit table using trigger.
Thanks
August 2, 2011 at 1:11 pm
What code have you written and were are getting stuck.
I mean no offense but this seems like homework or exam question... way too basic for anyone with experience.
August 2, 2011 at 1:17 pm
also, your example tables are all in Oracle syntax....a trigger in Oracle looks and behaves differently than SQL.
Oracle is all row based, where SQL is set based.
show us what you've done so far, and clarify what DBMS you are writing for.
Lowell
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply