answersLogoWhite

0


Best Answer

Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table.

Triggers can't be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined.

Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster

Cursors allow row-by-row prcessing of the resultsets.

Types of cursors:Static, Dynamic, Forward-only, Keyset-driven. See books online for more information.

Disadvantages of cursors: Each time you fetch a row from the cursor, it results in a network roundtrip, where as a normal SELECT query makes only one rowundtrip, however large the resultset is. Cursors are also costly because they require more resources and temporary storage (results in more IO operations). Furthere, there are restrictions on the SELECT statements that can be used with some types of cursors.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between trigger and cursor?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between insertion point and cursor?

What is the deference between Insertion Point and Pointers?


What is the difference between triggers and cursor in sql server?

In SQL Server, a cursor is the actual set of records retrieved by a query. Once declared as a cursor, the set of records can then be manipulated one by one. A trigger is a set of statements that is set to execute only when a certain action occurs, for example, whenever the last name on a table is updated.


Difference between the delete key an the back space?

The backspace key deletes to the left of the cursor, and the delete key deletes to the right of the cursor.


What is the difference between backspace and delete key?

The delete key removes the character above or to the right of the cursor. The backspace removes the character to the left of the cursor.


Difference between Cursor-Positioning commands and Display-Adjusting commands?

Cursor Positioning commands mainly used in CLI and Display Adjusting commands mainly used in GUI..


What is the difference between a mark 4 series 70 and a model 1911?

Trigger, sights, MSH


Difference between delete key and backspace key?

The delete button erases things in front of the cruser and the backspace button erases behind the cruser. ;) but next time do your own hw


What is the difference between a normal paint ball trigger and a repsonse trigger?

A normal trigger is simply- you push and a paintball comes out. A response trigger is kind of like an automatic but you cant just hold it. It will shoot rapidly and then stop for no apparent reason. Response triggers are great though.


What's the difference between a semi automatic and a automatic gun?

In a semi automatic gun you have to pull the trigger for each shot. In an automatic gun you just have to hold the trigger in to empty the clip.


Difference between database triggers and form triggers?

A data base trigger occurs when a DML operation is performed on a data base table. A form trigger occurs when the user presses a key or navigates between fields on the screen.


What is the difference between a Smart Parts Vibe and a Smart Parts SP-1?

The vibe and SP-1 have the same internal work, the difference is the body. The SP-1 has a tactical look and a single trigger. The Vibe has a sleek look with a double trigger.


What is difference between joystick and pen input?

A mouse is used for moving the cursor on a computer. A joystick is used for gaming and used in the cockpit of some aircraft.