场景:Oracle、有一列需要按其它列分组后,个别值需要保证唯一,:分完组后,只允许有一行设置默认标识,而其它行则无所谓。

-- Create/Recreate indexes
create unique index IDX_TSI_CODEITEM_CODE_DEFAULT on TSI_CODEITEM (CASE CODE_DEFAULT WHEN 1 THEN TSI_CODEITEMID||'1' ELSE TSI_CODEITEMID END)
tablespace TSHY
pctfree 10
initrans 2
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);

相关文章:

  • 2021-12-16
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-06-23
  • 2021-11-24
猜你喜欢
  • 2021-06-20
  • 2021-09-30
  • 2022-02-09
  • 2022-12-23
  • 2021-07-13
  • 2021-07-21
相关资源
相似解决方案