Create constraint in alter table without checking existing data

后端 未结 3 932
梦如初夏
梦如初夏 2021-01-13 00:53

I\'m trying to create a constraint on the OE.PRODUCT_INFORMATION table which is delivered with Oracle 11g R2. The constraint should make the PRODUCT

3条回答
  •  迷失自我
    2021-01-13 01:06

    You can use deferrable .

    ALTER TABLE PRODUCT_INFORMATION
      ADD CONSTRAINT PRINF_NAME_UNIQUE UNIQUE (PRODUCT_NAME)
    deferrable initially deferred NOVALIDATE; 
    

提交回复
热议问题