Results 1 to 9 of 9

Thread: Trigger can use in stored procedure

  1. #1
    Junior Member
    Join Date
    Jul 2007
    Answers
    15

    Trigger can use in stored procedure

    Trigger can use in stored procedure and how with simple example?


  2. #2
    Junior Member
    Join Date
    Jun 2007
    Answers
    28

    Re: Trigger can use in stored procedure

    You can not Call trigger Explicitly....


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Trigger can use in stored procedure

    Triggers can't be called explicitely ,they are raised automatically when the underlying event occurs.


  4. #4
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Trigger can use in stored procedure

    Infact you can call a procedures in a trigger body. The procedure is called when the trigger fires upon the specified event.


  5. #5
    Junior Member
    Join Date
    Oct 2007
    Answers
    1

    Re: Trigger can use in stored procedure

    HI

    you can call any SP by using following code.

    exec

    By using this code you can make use of any SP in a trigger,


  6. #6
    Junior Member
    Join Date
    Jul 2007
    Answers
    7

    Re: Trigger can use in stored procedure

    hi
    triggers r called implicitly. if u understand the concept of triggers, u'll not raise ths question. v use triggers to impose som businness rules wch v cannot mention in any database as constrains. triggers r raised if any sql st trying to violate those business rule. simple ex cld be "no updates / inserts on holidays and non-business hrs" so v write a trigger tht if a day is sunday or predefined holiday thn no inserts / updates. if some one try to update of sunday then this trigger raised automatically by the ora server. and updation is not possible.

    deviji2000@gmail.com

    Last edited by deviji2000; 10-15-2007 at 01:44 AM.

  7. #7
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Trigger can use in stored procedure

    Quote Originally Posted by deviji2000 View Post
    hi
    triggers r called implicitly.
    Triggers can't be called implicitely. They are raised.


  8. #8
    Junior Member
    Join Date
    Apr 2007
    Answers
    2

    Re: Trigger can use in stored procedure

    hi,
    Trigger are called automatically when any manuplation is done on the given table.


  9. #9
    Expert Member
    Join Date
    Apr 2007
    Answers
    500

    Re: Trigger can use in stored procedure

    Quote Originally Posted by mahesh9920 View Post
    Trigger can use in stored procedure and how with simple example?
    Triggers cannot be called directly. Instead they are fired automatically when you perform an insert/update or delete on a table that has triggers. Therefore, you cannot call a trigger in a stored procedure. You can perform an insert / update or delete that will force a trigger to fire. As to the second part of your question, you can absolutely execute stored procedures in the source code of a trigger


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact