|
Check constraints are like COND, however there is a difference. Check
constraints are actually enforced. COND is often ignored. I do not
think that UPDDTA enforced COND from day 1 but it does now. You could
create an RPG program which update a COND field with invalid values.
You could even use CPYF of a one field file of all X to a file with
multiple fields with a COND with not X and it will allow it. The
constraint won't.
Vern Hamberg on 12/07/2010 08:00 AM wrote:
DDS has no concept of constraints. You can use the ADDPFCST
command to add one to any PF. You can use ALTER TABLE in STRSQL to
do the same. The SQL Reference explains all about constraints, but
in brief, you have 4 kinds
- primary key, unique key, check, and referential.
The first 2 are fairly obvious, I think.
Check constraints are like COND in DDS, I think
- the value in the column has to satisfy some condition. <<SNIP>>
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.