How can I create unique constraint when I need to treat null values as equals.
For
alter table T1 add constraint T1_UN
unique (nvl(C1, ‘ ‘))
i get
ORA-00904: : invalid identifier
points on nvl
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
NOT NULLseems like a better idea, but you could make a function-based index unique: