Wednesday, January 7, 2009

Types and Categories of Triggers



Triggers are a group of SQL Statements linked with a table, which executes in response to a user query which intends to make changes in the data of that table. Thus, these queries must be from Insert, Update or Delete.

Triggers are of two categories:
1. DML triggers (Data Manipulation Triggers)
2. DDL Triggers (Data Definition Triggers)

Sunday, November 9, 2008

Difference between ref and out keyword in C#




Difference #1
A variable passed as a ref parameter must be initialized before it is passed to the method. A variable passed as out parameter need not be initialized (but you may initialize it if you so desire) before it is passed to the method.

Difference #2
ref
- this keyword passes a variable as a reference to the method which changes its value as per program logic (but changing value is optional).

out - this keyword passes a variable as a reference to the method which must change its value as per program logic before returning any value or before using the passed variable.