Reputation: 1906
My guess would be that a foreign key reference is set to RESTRICT by default. But, is there any standard for this? Is the default equal on any database type? Or should these values be defined in all statements just to be sure?
Upvotes: 3
Views: 201
Reputation: 8228
You should also take into account that not all DBMSs admit these options (nor allow the same values in them). For instance, I think that Oracle does not support the onupdate clause
Upvotes: 0
Reputation: 12704
For postgres NO ACTION is the default, which for most purposes is same as RESTRICT, as stated here.
I would recommend to be explicit, especially in DDL, whenever in doubt (and then some). There are various reasons for this:
Upvotes: 1