Re: doubts about a constraint's definition
Started by Peter Gibbsabout 23 years ago2 messagesgeneral
enediel wrote:
I need to create a column, where the information is conserved in the same
way that it was written by the user, but the data of this column is unique
if it's only taken to capitaldeclaring a constraint
... unique(column name) is not enough to me 'cause'ab'
'AB'
'aB'
....
will be accepted
Create a unique functional index e.g.
create unique index index_name on table_name (upper(fieldname));
--
Peter Gibbs
EmKel Systems
Import Notes
Reference msg id not found: 005601c2efcc$81b8e460$2824a8c0@nsoft
"enediel" <enediel@com.ith.tur.cu> writes:
I need to create a column, where the information is conserved in the same
way that it was written by the user, but the data of this column is unique
if it's only taken to capital
CREATE UNIQUE INDEX foo ON tab (UPPER(column));
regards, tom lane
Import Notes
Reply to msg id not found: 005601c2efcc$81b8e460$2824a8c0@nsoftReference msg id not found: 005601c2efcc$81b8e460$2824a8c0@nsoft | Resolved by subject fallback