On Delete Set Default
Hola
Tengo dos tablas: CLIENTE q tiene una foreign key a PROGRAMA, entonces necesito hacer q al borrar un programa, en CLIENTE me guarde un 0, q es un programa q nunca lo puedo modificar ni borrar. Entonces no se como declararlo, vi que se hace con un set default pero me da error al crearla.
ALTER TABLE CLIENTE
add constraint IDPROGRAMA
FOREIGN KEY(IDPROGRAMA) REFERENCES PROGRAMA(IDPROGRAMA) ON DELETE SET DEFAULT 0 ON UPDATE CASCADE
Ah uso INTERBASE
A ver si alguien me puede ayudar
Muchas gracias
|