Rne*_*net 7 oracle
我是否可以添加检查约束,以确保所有值都是唯一的,但允许重复默认值?
Ton*_*ews 11
您可以使用基于函数的索引(FBI)来实现此目的:
create unique index idx on my_table (case when col != 'DEFAULT' then col end));
这会在除"DEFAULT"之外的所有值上创建唯一索引.
归档时间:
14 年 前
查看次数:
169 次
最近记录: