ppecher
ppecher

Reputation: 1988

Conditional insertion trigger

Whenever a row is inserted into Course_Enrollment and the enrollment_date value is not explicitly given in the insertion statement (i.e., it is missing), then the CURRENT_TIMESTAMP value is used for the Enrollment_date column of the inserted row.

Is this possible with TSQL 2000? If so, how?

Upvotes: 0

Views: 56

Answers (1)

Kilanash
Kilanash

Reputation: 4559

Use a default value for the CURRENT_TIMESTAMP column of getdate().

Upvotes: 2

Related Questions