How to restrict string and date values in a Teradata table -
is there way impose restriction on teradata table fields,
column education can contain: high school
, bs
, ms
, phd
, nothing else. if tries insert
other string, referential integrity
mechanism throw exception
also, there way impose restriction date
field, such newly inserted date must >= current_date
?
thank experts
it's same other rdbms (besides compress part, teradata save disk space):
datecol date check(datecol >= current_date)
maybe add not null constraint.
education varchar(11) check (education in ('high school', 'bs', 'ms', 'phd'))
in teradata should add compress ('high school', 'bs', 'ms', 'phd')
to save disk space.
of course insert 4 values in table, add primary key , foreign key referencing column...
Comments
Post a Comment