hello all,
I'm wondering if its somehow possible to create a pk/fk constraint for
the table below
create table Example (
id int not null auto_increment primary key,
table_name enum('TabA','TabB') not null,
table_id int not null
) type = InnoDB;
if table_name is 'TabA', then I want to make sure the row exists in
TabA. Likewise if table_name is 'TabB'
the usual syntax to add a foreign key constraint doesn't seem to allow
this. I could certainly perform this check with an insert trigger, but,
alas, mysql does not support triggers.
any help?
--
Jeff Mathis, Ph.D. 505-955-1434
The Prediction Company [EMAIL PROTECTED]
525 Camino de los Marquez, Ste 6 http://www.predict.com
Santa Fe, NM 87505
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]