469,898 Members | 2,101 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,898 developers. It's quick & easy.

Difference B/W Triggers and Stored Procedurs?

Hey can anyone tell me whether Triggers and Stored Procedures are same?

Triggers are stored procedures that get executed automatically when an Insert,Update,or Delete operation takes place.

Stored Procedures

If i m right,Stored procedures are similar to Functions in C??
Feb 26 '08 #1
2 1264
1,134 Expert 1GB
you are correct.

I would add to stored procedures
that they execute on the server and they can, but don't have to, return a recordset like a view does.

other than that yes they are like functions and subs in programming languages such as c, vb, java etc.
Feb 26 '08 #2
2,878 Expert 2GB
The only other difference is you can not embed a stored proc call in a statement, not like function


If MyFunction() = 1

But Not:

If MyStoredProc = 1

-- CK
Feb 27 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Mark Flippin | last post: by
4 posts views Thread by --CELKO-- | last post: by
2 posts views Thread by ajaysbedi | last post: by
1 post views Thread by Waqarahmed | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.