Mahesh S wrote:
I would like to have an attribute that would store an integer or float
range (say 6 to 10). Is it possible to have both the lower and upper
limit specified in a single field?
Not sure what you mean.
Attributes are elements of structured types. Are you talking about a
structured type?
CREATE TYPE address AS (no INTEGER, street VARCHAR(30))
and you you want to constrain the attribute?
You can't do this as part of CREATE TYPE, but you can overload the
"mutator" and "constructor" to constrain what can be set.
Or are you talking about a column rather than attribute?
CREATE TABLE T(c1 float check (c1 between 6 and 10))
Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab