What are triggers in SQL Server?

What are triggers in SQL Server?

- Triggers are special kind of event driven stored procedures.
- Executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table,
- Can specify which trigger fires first or fires last using sp_settriggerorder,
- Triggers can't be invoked on demand,
- They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens,
- Triggers are generally used to implement business rules, auditing,
- Triggers can also be used to extend the referential integrity checks
What is a self join in SQL Server?
Two instances of the same table will be joined in the query........
Difference between UNION ALL and UNION
UNION statement eliminates duplicate rows whereas UNION ALL statement includes duplicate rows........
Disadvantages of cursor
Cursor manipulates records row by row. It requires temporary storage for row manipulation........
Post your comment