What is cursor ? And what is difference between Trigger ?

Answer Posted / bhaskar

Cursor is an Database object and retrive the rows from
database row by row ,
And it is maily use for ot reduce the network traffic
it contains 5 features
1.DECLARE the Cursor
2.OPEN the cusrsor
3.FETCH the cursor
4.CLOSE the cursor
5.DEALLOCATE the cursor

TRIGGER : IT is also an database object and You can
perform an anction Trigger will fire automatacallly.
like (DML,DDL)
They can cascade changes through related tables in the
database; however, these changes can be executed more
efficiently using cascading referential integrity
constraints.

They can guard against malicious or incorrect INSERT,
UPDATE, and DELETE operations and enforce other
restrictions that are more complex than those defined with
CHECK constraints.

Multiple DML triggers of the same type (INSERT, UPDATE, or
DELETE) on a table allow multiple, different actions to
take place in response to the same modification statement.

Is This Answer Correct ?    53 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why use stored procedures in sql server?

710


How to delete an existing row with delete statements in ms sql server?

773


What are different types of statements that are supported by sql?

777


what is a default tcp/ip socket assigned for sql server? : Sql server database administration

758


What is sql server used for?

729






What is report snapshot?

128


How can I change procedure name in sql server?

698


Which are new data types introduced in sql server 2008?

810


How to update a field in SQL after ALTERING a row?

882


What according to you is the difference between mysql and sql server performance?

767


What is your recommendation for a query running very slow? : sql server database administration

774


How can you set the threshold at which sql server will generate keysets asynchronously?

736


Explain DBCC?

734


Explain sql server service broker?

705


What are examples of triggers?

810