Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Function based unique constraint
Just reading the docs:
Oracle recommends that you do not explicitly define UNIQUE indexes on tables. Uniqueness is strictly a logical concept and should be associated with the definition of a table. Therefore, define UNIQUE integrity constraints on the desired columns.
Following the recomendation, I changed three of the four unique indexes to be unique constraints (though, it seems they both create the other). The fourth one, however, is function based. Is there a way to create function based unique constraint, or must the unique key be defined as an index.
create table a(a varchar2(1), constraint a1_a_uq unique(lower(a)); create table a(a varchar2(1), constraint a1_a_uq unique(lower(a))
*ERROR at line 1:
The asterisk was under the parenthesis between "lower" and "a".
Brian Received on Fri Nov 24 2000 - 13:42:09 CST
![]() |
![]() |