Re: case-insensitivity in tables
Date: 1 Sep 1994 20:51:54 +0100
Message-ID: <345bcq$18r_at_crocus.csv.warwick.ac.uk>
awy_at_wisny.mv.att.com (-yoshida a.w.) writes:
> What is the most efficient way to ensure that a particular table always
> has its data inserted/updated in either lower-case or upper-case. We would
> like to avoid having to constantly perform lower(column) = lower(value)
> for each comparison made. Are triggers the best way to accomplish this?
> Any thoughts would be appreciated.
You don't need a trigger for this; a simple Check Constraint will do:
Create Table ...
(..., ..., Check (MyColumn1 = Upper (MyColumn1)), ..., Check (MyColumn2 = Lower (MyColumn2)), ...);
I've heard that in 7.1, which we haven't seen yet, you can define your own datatypes. If this is true (? anyone?), then this could eliminate a hellova lot of my check constraints.
> - Andre Yoshida
Hank Robinson
Oracle DBA
University of Warwick
Received on Thu Sep 01 1994 - 21:51:54 CEST