NOT DEFERRABLE versus DEFERRABLE INITIALLY IMMEDIATE

前端 未结 5 1400
有刺的猬
有刺的猬 2020-12-02 06:51

I read this about the SQL keyword DEFERRABLE in Database Systems - The Complete Book.

The latter [NOT DEFERRABLE] is defau

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 07:30

    With DEFERRABLE INITIALLY IMMEDIATE you can defer the constraints on demand when you need it.

    This is useful if you normally want to check the constraints at statement time, but for e.g. a batch load want to defer the checking until commit time.

    The syntax how to defer the constraints is different for the various DBMS though.

    With NOT DEFERRABLE you will never ever be able to defer the checking until commit time.

提交回复
热议问题