Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Wht is the difference between stored procedure and trigger

Answers were Sorted based on User's Feedback



Wht is the difference between stored procedure and trigger..

Answer / rajvelur

STORED PROCEDURE
A stored procedure is an already written SQL statement that
is saved in the database. We can run the stored procedure
from the database's command environment

1.Precompiled execution. SQL Server compiles each stored
procedure once and then reutilizes the execution plan. This
results in tremendous performance boosts when stored
procedures are called repeatedly.
2.Reduced client/server traffic. If network bandwidth is a
concern in your environment, you'll be happy to learn that
stored procedures can reduce long SQL queries to a single
line that is transmitted over the wire.
3.Efficient reuse of code and programming abstraction.
Stored procedures can be used by multiple users and client
programs. If you utilize them in a planned manner, you'll
find the development cycle takes less time.
4.Enhanced security controls. You can grant users permission
to execute a stored procedure independently of underlying
table permissions.


TRIGGER

A trigger is an object contained within an SQL Server
database that is used to execute a batch of SQL code
whenever a specific event occurs. As the name suggests, a
trigger is “fired” whenever an INSERT, UPDATE, or DELETE SQL
command is executed against a specific table.

Is This Answer Correct ?    29 Yes 3 No

Wht is the difference between stored procedure and trigger..

Answer / jerry joseph

Stored Procedures does not execute automatically

Triggers are a special type of Stored procedure which
executes automatically

Types of Triggers
- INSTEAD OF triggers
- AFTER Triggers

Is This Answer Correct ?    15 Yes 5 No

Wht is the difference between stored procedure and trigger..

Answer / anand

SRTORED PROCEDURES : STORED PROCEDURES IS A SET OF SQL
STATEMENT WHICH CAN NOT EXECUTES AUTOMATICALLY.

TRIGGERS : TRIGGERS IS A STORED PROCEDURE AND EXECUTES
AUTOMATICALY. IF ANY CHANGES OCCURED IN A TABLE OF DATABASE
I.E. INSERT, UPDATE OR DELETE STATE IS OCCURED IN TABLE IT
FIRED AUTOMATICALY .

Is This Answer Correct ?    13 Yes 6 No

Wht is the difference between stored procedure and trigger..

Answer / sujit kumar suman

Store Procedure:-It is a pre-compiled object which stored in
current database.It can't execute automatically.
--create store procedure
create proc procedure_name
as
select command
and then
go

--execute procedure

exec procedure_name

Is This Answer Correct ?    6 Yes 2 No

Wht is the difference between stored procedure and trigger..

Answer / rakesh

A stored procedure can be created with no parameters, IN
parameters, OUT parameters, or IN/OUT parameters. There can
be many parameters per stored procedure.

It is also called as a FUNCTION.

Is This Answer Correct ?    2 Yes 1 No

Wht is the difference between stored procedure and trigger..

Answer / hytham raju

triggers are applied on a particular table /views
stored procedures are applied for particular data base

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

When we should use @@error?

0 Answers  


Does any body please help me what question's have asked for SSRS in the interview?

0 Answers  


how to get 25th row in any table in sqlserver can u tell me syntax

8 Answers  


Can a database be shrunk with users active?

0 Answers  


how to create a scrollable cursor with the scroll option? : Sql server database administration

0 Answers  


What are cursors?

8 Answers  


Do you know how to store and query spatial data?

0 Answers  


What is a trigger?

4 Answers  


What is reference section?

0 Answers  


I have a table EMP in which the values will be like this EmpId Ename Sal DeptId 11 Ram 10000 10 11 Ram 10000 10 22 Raj 20000 20 22 Raj 20000 20 33 Anil 15000 30 33 Anil 15000 30 I want to delete only duplicate Rows. After Delete I want the output like this EmpId Ename Sal DeptId 11 Ram 10000 10 22 Raj 20000 20 33 Anil 15000 30

13 Answers   DELL,


What stored procedure can you use to display the current processes?

0 Answers  


What the different types of Replication and why are they used?

0 Answers  


Categories