- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Interview Success Kit - Get Success in Job Interviews Interview Success Kit - 30,000 Interview Que. & Ans.
Covers 30,000+ Interview Questions asked in actual MNC Interviews - all with model answers.
Get Your Dream Job Now -
Sponsored Links
Interview Questions
Our Services

Question :
Difference between Stored Procedure and Trigger

Category SQL Interview Questions
Rating (3.2) By 67 users
Added on 8/12/2011
Views 5265
Rate it!

Information related to Stored procedure you can see in USER_SOURCE,USER_OBJECTS(current user) tables.

Information related to triggers stored in USER_SOURCE,USER_TRIGGERS (current user) Tables.

Stored procedure can't be inactive but trigger can be Inactive.

we can call stored procedure explicitly.

but trigger is automatically invoked when the action defined in trigger is done.
create trigger <trig_Name> after Insert on <table>

this trigger invoked after we insert something on that table.

Posted by: sathyaajh

Contact sathyaajh Contact sathyaajh

Triggers are used to initiate a particular activity after fulfilling certain condition.It need to define and can be enable and disable according to need.

Posted by: Amit

Contact Amit Contact Amit

Triggers get invoked automatically when the event specified in it gets fulfilled, it can't return any value.So user have no control over it's invocation.Whereas stored procedure can be called as per application requirement and can get output parameters.

Posted by: nilambari

Contact nilambari Contact nilambari

stored procedure is a block of code contains sql statements.
stored procedure is a precompiled block of code,which need not be compiled for every time calling.

trigger is a user defined constraint it has to be called when situation araises.

Posted by: pushpa g

Contact pushpa g Contact pushpa g

Triggers once defined are called automatically, there can be no explicit invocation
Stored procedure has to be called explicitly, moreover procedures can return values, triggers can't

Posted by: mahendra

Contact mahendra Contact mahendra

Stored procedure used to perform operation. but trigger used to prevent operation.

Posted by: Roobesh

Contact Roobesh Contact Roobesh

1. trigger doesnot except argument
but store procedure does.
2. trigger cannot be local and store as a stand alone object in database.
but store procedure can be store in package.
3. Trigger execute implicitly whereas store procedure execute via
procedure call from another block.

Posted by: Nitin

Contact Nitin Contact Nitin

you will have to call stored procedure but trigger automatically called

Posted by: Shabbir Alam

Contact Shabbir Alam Contact Shabbir Alam

PROCEDURE-> means it will call the specified function,when we assumed it before.procedure is active.
TRIGGER-> trigger are active for after fulfilling the specified conditions.

Posted by: sandhya

Contact sandhya Contact sandhya

We can call stored procedure explicitly.but Trigger is invoked implicitly.

procedures are invoked by the user whereas triggers are invoked by the system.

procedure can be created with out a table but a trigger can't be created with out table.

procedures accept parameters where as triggers can't.

procedures return a value,triggers can't return any value.

Posted by: ajay

Contact ajay Contact ajay

commit,savepoint and rollback
are not allowed in triggers.
We can write commit,savepoint and rollback in procedures.

Posted by: Milind

Contact Milind Contact Milind

Triggers are used to initiate a particular activity after fulfilling certain condition.It need to define and can be enable and disable according to need.

Posted by: william

Contact william Contact william

commit,savepoint and rollback
are not allowed in triggers.
We can write commit,savepoint and rollback in procedures.

But we can add commit,rollback in trigger by adding next Line:
Autonomous Transaction

Posted by: Swapnil Bhosale

Contact Swapnil Bhosale Contact Swapnil Bhosale

Stored procedures are used to perform a task and should be invoked explicitly using exec.
Triggers are used to restrict invalid transactions and invokes(fires) implicitly when an dml manipulation happens

Posted by: kiran

Contact kiran Contact kiran

A Stored Procedure is set of pre-compiled sql statements which are stored in memory. These statements are executed by executing that procedure which display results based on arguments passed to that procedure.

A trigger is invoked automatically when any operation (insertion,deletion and updation) is performed on particular table.Triggers are used to record events performed on table.

Posted by: Rajiv

Contact Rajiv Contact Rajiv

If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.
  • Name :*
    Email Id :*
    Answer :*
    Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
    Process Verification Enter the above shown code: *
    Inform me about updated answers to this question

    Related Questions
    View Answer
    When using a count(disitnct) is it better to use a self-join or temp table to find redundant data, and provide an example?

    View Answer
    What is the advantage to use trigger in your PL?

    View Answer
    What the difference between UNION and UNIONALL?

    View Answer
    How to find second maximum value from a table?

    View Answer
    How to display duplicate rows in a table?

    View Answer
    What is joint?

    View Answer
    What is the difference between TRUNCATE and DELETE commands
    View Answer
    Which system table contains information on constraints on all the tables created?
    View Answer
    Which command displays the SQL command in the SQL buffer, and then executes it
    View Answer
    What does the following query do

    View Answer
    What will be the output of the following query

    View Answer


    Will the outputs of the above two commands differ

    View Answer
    What is the difference between Single row sub-Query and Scalar sub-Query

    View Answer
    How do I write a cron which will run a SQL query and mail the results to a group?

    View Answer
    Is there any query which is used to find the case sensitivity in each records in database through visual basic?

    View Answer
    I have a table with duplicate names in it. Write me a query which returns only duplicate rows with number of times they are repeated.

    View Answer
    How to copy sql table.

    View Answer
    Difference between Store Procedure and Trigger

    View Answer
    Cursor Syntax brief history

    View Answer
    Explain normalization with examples.

    View Answer

    Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here - Best Freshers & Experienced Jobs Website.

    View ALL SQL Interview Questions & Answers

    User Options
    Latest 20 Questions
    Where are Blocks located?
    How to make a block cacheable?
    What is the need of making Blocks cacheable?
    Explain groups concept in user management of Concrete5?
    What is department?
    What is departmental accounting?
    What is departmental accounting?
    What is departmental accounting?
    What is meant by invoice price?
    What are the features of dependent branch?
    What is a foreign branch?
    What is a foreign branch?
    What is a foreign branch?
    Name and explain the two types of Inland Branch.
    Explain Inland Branch.
    What are the types of branch?
    What is the responsibility of a branch manager?
    Who is a branch manager?
    What is the primary objective of branch accounting?
    What is branch accounting?

    Fresher Jobs | Experienced Jobs | Government Jobs | Walkin Jobs | Company Profiles | Interview Questions | Placement Papers | Companies In India | Consultants In India | Colleges In India | Exams In India | Latest Results | Notifications In India | Call Centers In India | Training Institutes In India | Job Communities In India | Courses In India | Jobs by Keyskills | Jobs by Functional Areas

    Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

    Gate Articles | Gate Books | Gate Colleges | Gate Downloads | Gate Faqs | Gate Jobs | Gate News | Gate Sample Papers | Gate Training Institutes

    MBA Articles | MBA Books | MBA Case Studies | MBA Business Schools | MBA Current Affairs | MBA Downloads | MBA Events | MBA Notifications | MBA FAQs | MBA Jobs
    MBA Job Consultants | MBA News | MBA Results | MBA Courses | MBA Sample Papers | MBA Interview Questions | MBA Training Institutes

    GRE Articles | GRE Books | GRE Colleges | GRE Downloads | GRE Events | GRE FAQs | GRE News | GRE Training Institutes | GRE Sample Papers

    IAS Articles | IAS Books | IAS Current Affairs | IAS Downloads | IAS Events | IAS FAQs | IAS News | IAS Notifications | IAS UPSC Jobs | IAS Previous Question Papers
    IAS Results | IAS Sample Papers | IAS Interview Questions | IAS Training Institutes | IAS Toppers Interview

    SAP Articles | SAP Books | SAP Certifications | SAP Companies | SAP Study Materials | SAP Events | SAP FAQs | SAP Jobs | SAP Job Consultants
    SAP Links | SAP News | SAP Sample Papers | SAP Interview Questions | SAP Training Institutes |

    Copyright ©2003-2016, All Rights Reserved.
    Privacy Policy | Terms and Conditions

    Cache = 0 Seconds