triggers and functions

Posted by Varung under Sql Server on 12/5/2011 | Points: 10 | Views : 1002 | Status : [Member] | Replies : 6
can u please explain me trigger and functions with an example.....
thanks in advance

G.Varun


Responses

Posted by: Arefin on: 12/5/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Just visit the following sites:

For Trigger:
http://msdn.microsoft.com/en-us/library/aa258254%28v=sql.80%29.aspx

http://www.sqlteam.com/article/an-introduction-to-triggers-part-i


For Function:
http://msdn.microsoft.com/en-us/magazine/cc164062.aspx

http://www.sqlteam.com/article/user-defined-functions



Thanks,
Arefin

Varung, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Varung on: 12/5/2011 [Member] Starter | Points: 25

Up
0
Down
thanQ

G.Varun

Varung, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 9/13/2012 [Member] Bronze | Points: 25

Up
0
Down
Trigger

1)Trigger gets automatically executed when insert update or delete is fired on a table.
2) we can't schedule a trigger
3)we can't call a trigger from front end files.
4)we can't pass the parameters as an input to a trigger.
5)within a function you cannot call a trigger

Functions

1)Function is a named pl/sql block which is stored in database..
2). We can invoke by calling the name of the function whenever we need.
3)Function return atleast one value
4)Cannot have transaction within function
5)Cannot be used with XML FOR clause

Varung, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 9/13/2012 [Member] Starter | Points: 25

Up
0
Down
hi varun,
follow this link for triggers
http://www.codeproject.com/Articles/25600/Triggers-Sql-Server

Thanks & Regards
Hari

Varung, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 9/13/2012 [Member] Starter | Points: 25

Up
0
Down
hi varun,
this link for functions
http://www.codeproject.com/Articles/38998/Most-Commonly-Used-Functions-in-SQL-Server-2005-20

Thanks & Regards
Hari

Varung, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 9/14/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi Varun,
Please Mark as Answer if it helpful to you..That helps other who search the same...


Varung, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response