All pastes #184905 Raw Edit

Anonymous

public text v1 · immutable
#184905 ·published 2006-09-28 12:27 UTC
rendered paste body
Spanko: W_ork: OK. Suppose I have three kinds of employees. I have a table EMPLOYEE with attributes ssnr (PK), name, salary. Then I have a table WORKER with ssnr (FK to EMPLOYEE.ssnr) and some other attributes; a table SOLDIER with ssnr (FK to EMPLOYEE.ssnr) and some other attributes; and a table THINKER with ssnr (FK to EMPLOYEE.ssnr) and some other attributes. Now, I want to specify "CONSTRAINT employee_ssnr_fk FOREIGN KEY (snnr) REFERENCES EMPLOYEE(ssnr) ON DELETE ..." for each of WORKER, SOLDIER, THINKER, but I'd rather just define that once than have to copy-and-paste it in its entirety t