Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hello

 

i need to create a trigger for DELETE, UPDATE and INSERT in all the Tables...

can i put it all in a Single Trigger....

if so how to achieve it....

 

and one more....i need to fine out the TRIGGER ACTION for which the TRIGGER is fired (i.e INSERT or DELETE or UPDATE)....i need to insert a code in that trigger to identify this....

 

Can u please help me in this..

Your Help is highly appreciated

 

Vathan

  • Administrators
Posted

If you are using MS SQL then you can create a trigger using code like

CREATE TRIGGER  ON 
FOR INSERT, UPDATE, DELETE 
AS
--body of trigger goes here

 

within the body of the trigger you would then access two tables (inserted and deleted) which contain the modified rows.

 

It may help if you give a bit more detail about what you want the trigger to do.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...