Home » SQL & PL/SQL » SQL & PL/SQL » Trigger for audit purpose
Trigger for audit purpose [message #202283] Wed, 08 November 2006 23:17 Go to next message
kanmani_karuppannan
Messages: 23
Registered: November 2006
Location: India
Junior Member

Hi All,

I have a requirement like this

i have two table like

Table Name : a

Colums : x number,y number,z varchar2(50)

Table Name : b

Colums : x number,y number,z varchar2(50)


I need to create a trigger with following condition on table a

i) if i insert the records on table a, the same values will be stored into table b,

ii) if i delete the records on table a, deleted information shold be in table b

i,e Table a

x y z
100 50 xyz

if i delete where x = 100 then all corresponding information that should be stored into table b

i,e

x y z
100 50 xyz

Note : Column name for delete the records that will be selected randomly.

This all will be done on oracle 9i.

Please help me.

Thanks,
Mani.

Re: Trigger for audit purpose [message #202284 is a reply to message #202283] Wed, 08 November 2006 23:19 Go to previous messageGo to next message
kanmani_karuppannan
Messages: 23
Registered: November 2006
Location: India
Junior Member

kanmani_karuppannan wrote on Wed, 08 November 2006 23:17
Hi All,

I have a requirement like this

i have two table like

Table Name : a

Colums : x number,y number,z varchar2(50)

Table Name : b

Colums : x number,y number,z varchar2(50)


I need to create a trigger with following condition on table a

i) if i insert the records on table a, the same values will be stored into table b,

ii) if i delete the records on table a, deleted information shold be in table b

i,e Table a

x y z
100 50 xyz

if i delete where x = 100 then all corresponding information that should be stored into table b

i,e

x y z
100 50 xyz

Note : Column name for delete the records that will be selected randomly.

This all will be done on oracle 9i.

Please help me.

Thanks,
Mani.



Re: Trigger for audit purpose [message #202293 is a reply to message #202284] Thu, 09 November 2006 00:36 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
If cross-posting doesn't help, maybe reposting will, you thought?
Try searching the board or Googling.

Continue in your other thread.
Previous Topic: cannot insert data
Next Topic: produce 1 row
Goto Forum:
  


Current Time: Sat Dec 10 02:57:29 CST 2016

Total time taken to generate the page: 0.08736 seconds