ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
Difference between Triggers and Stored Procedure
 Question Submitted By :: Senthil_allinterview
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Difference between Triggers and Stored Procedure
Answer
# 1
stored procedure 

Definition

please give me Answer
 
Is This Answer Correct ?    1 Yes 0 No
Rajani Kant
 
  Re: Difference between Triggers and Stored Procedure
Answer
# 2
Stored Procedures are called by the programmer wherever it 
wants to fire but triggers fired automatically when 
insert,delete,update occured. And triggers can be 
implemented to tables & views only where as s.p used in the 
database independently
 
Is This Answer Correct ?    3 Yes 0 No
Ram
 
 
 
  Re: Difference between Triggers and Stored Procedure
Answer
# 3
To use stored procedure you have to make a call to that
procedure but Triggers fired automatically when an event is
occurred on the table associated with that Trigger like add,
insert or delete.
 
Is This Answer Correct ?    5 Yes 0 No
Pankaj Arya
 
  Re: Difference between Triggers and Stored Procedure
Answer
# 4
Stored Procedure can give one output paramenter,but 
Triggers can not give any output parameter
 
Is This Answer Correct ?    2 Yes 0 No
Gopal Chauhan
 
  Re: Difference between Triggers and Stored Procedure
Answer
# 5
1. SP may Return a value but Trigger Not,
2. In SP you can pass parameter But in trigger you can't
3. we explicitly call the Sp when Trigger are implicitly 
fired
4. you can write a sp in Trigger but in a Trigger you cant 
write SP.
5. Trigger written on an individual Table or View where SP 
is written for an Database
 
Is This Answer Correct ?    4 Yes 1 No
Ghanshyam Vrema
 
  Re: Difference between Triggers and Stored Procedure
Answer
# 6
In case of sql queries,it is possible to compile one query 
at a time,but incase of stored procedure we can compile 
bunch of queries at a time and also it is need at first 
time only,suppose we need modification on queries,after 
modifications no need to compile again in case of stored 
procedures,but in case of sql queries we have to compile 
every time.Stored procedure contain queries in compiled 
format so execution also fast and tome saving.One more 
thing is in case of stored procedures serurity also more.
 
Is This Answer Correct ?    1 Yes 0 No
Gangi Naidu.k
 
  Re: Difference between Triggers and Stored Procedure
Answer
# 7
sp and trigger are both predefined set of sql statements

we can pass the arguments for sp but we cant pass the 
arguments for triggers.

trigger will fire implicitly, when ever relavent action 
performed by the user on the tables where the triggers are 
placed.

But in the stored procedures u must call explicitly.
 
Is This Answer Correct ?    1 Yes 1 No
Madhu Prakash P
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
how to change column into row in sql  1
how to retrive only second row from table in sql server 2000? CTS7
Wht is the difference between stored procedure and trigger TCS2
How to Display, Amount of Disk Activity Generated by Transact-SQL Statements?  1
Wht is SQL Injection Attack ?  1
Explain basic SQL queries with SELECT from where Order By, Group By-Having? Wipro1
What is the default value of CHAR type? Bosch6
Which virtual table does a trigger use?  3
What is BCP? When do we use it?  1
What is a trigger?  6
what is the Enterprise manager(2000) and management studio (2005)?  2
About Indexed Views? with example? plz reply...  1
what is the query and condition to delete datas in sql server.  1
Would it be a good idea to create an index on a table that always contains 10 records? Why or why not?  2
What is a deadlock and what is a live lock? How will you go about resolving deadlocks?  1
can you any body tell me simple recovery,full recovery,bulk logged recovery where can use?  1
can you any body tell me suppose database is suspect mode. how can take to normal? Teledata1
What's the purpose of Stored Procedure? Wipro3
What are statistics, under what circumstances they go out of date, how do you update them? HCL2
Difference between Function and Procedure-in general?  2
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com