Restriction: | Must be in a MODIFY RUN group |
Note: | In order for a referential constraint to be established, the foreign key must specify the same number of variables as the primary key, in the same order, and the variables must be of the same type (character/numeric) and length. |
See: | Understanding Integrity Constraints in SAS Language Reference: Concepts |
If you use exactly the same variables, then the variables must be defined in a different order.
The foreign key's update and delete referential actions must both be RESTRICT.
ic create not null(socsec) message='Invalid Social Security number';
ic create a = not null(x); ic create Unique_D = unique(d); ic create Distinct_DE = distinct(d e); ic create E_less_D = check(where=(e < d or d = 99)); ic create primkey = primary key(a b); ic create forkey = foreign key (a b) references table-name on update cascade on delete set null; ic create not null (x);