Subject | partial unique index |
---|---|
Author | Lauri Zoova |
Post date | 2009-03-11T03:48:13Z |
Hello!
An example for index checking uniqueness of only visible users:
CREATE UNIQUE INDEX UNQ_NAME ON USERS_TABLE COMPUTED BY
(IIF(COL_USER_DELETED = 0, COL_USER_NAME, COL_ID));
Useful when some records need to have unique name while others dont.
Just wanted to share my invention ;)
--
BR,
Lauri
An example for index checking uniqueness of only visible users:
CREATE UNIQUE INDEX UNQ_NAME ON USERS_TABLE COMPUTED BY
(IIF(COL_USER_DELETED = 0, COL_USER_NAME, COL_ID));
Useful when some records need to have unique name while others dont.
Just wanted to share my invention ;)
--
BR,
Lauri