I had the following quiz question and could not answer it myself because of a little confusion.
Please answer this and tell me why?
A database trigger is an alternative for?
A. Stored procedure
B. Primary key for implementing referential integrity
C. Foreign key for implementing referential integrity
D. All of the above
Best Answer
I don't expect the writer of the question meant it this way, but words mean things and the question specifies a "database trigger", therefore there is no correct answer.
Unlike Row and Statement triggers, Database triggers fire for things like
AFTER STARTUP ON DATABASE
,AFTER SERVERERROR ON DATABASE
andAFTER LOGON ON DATABASE
.