Reputation: 976
I have a column on my table which has unique key property, but i also want it to be unique in an insensitive manner.What happens is if there is a key like xyz, insert statement with values Xyz,xYZ works properly, which I want to prevent. What can i use to achieve this? (I am using postgresql.)
Upvotes: 0
Views: 61
Reputation: 24086
I think you could do something like this:
create unique index on tableName (lower(columnName))
Upvotes: 1