Click here to Skip to main content
15,888,527 members
Please Sign up or sign in to vote.
1.50/5 (5 votes)
I trying to find the diff between cursors and triggers.
Posted
Comments
Sergey Alexandrovich Kryukov 22-Jun-11 14:00pm    
"What's the difference between Apple and apple?", "What's the difference between a horse and a saddle?" do you feel the absurd or you need more?
This is not a question. Ask what do you need to know on each...
--SA

Cursors [^]versus Triggers[^] - they are different constructs and cannot be compared or contrasted directly.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 22-Jun-11 14:00pm    
My 5. I don't know how to tell it to everyone; please see my comment to the question above.
--SA
Abhinav S 22-Jun-11 14:11pm    
Thanks for the 5.
That is exactly how I wanted to put it - apples and oranges!
Cursors allow row-by-row prcessing of the resultsets.
Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table.

More information: Cursor[^] | Trigger[^]
 
Share this answer
 
Comments
CS1401 22-Jun-11 9:04am    
Thanks for your interest patel.
Prerak Patel 22-Jun-11 9:06am    
You are welcome.
curser is an database object and retrive the rows from database row by row.

trigger it's also database object and you can perform an action trigger will fire automatacally.
 
Share this answer
 
Comments
CHill60 3-Jun-13 7:08am    
Please do not resurrect old questions that have already been answered

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900