insert foreign keys with trigger

Hello.
I got the following tables :


CREATE TABLE A (
id_a INT AUTO_INCREMENT PRIMARY KEY,
name_a VARCHAR(50),
surname_a VARCHAR(50));

CREATE TABLE B(
id_b INT AUTO_INCREMENT PRIMARY KEY,
name_b VARCHAR(50),
surname_b VARCHAR(50),
unique bbb(name_b,surname_b));

CREATE TABLE C(
id_c INT AUTO_INCREMENT PRIMARY KEY,
cab VARCHAR(40) UNIQUE);

CREATE TABLE D(
id_as INT,
id_bs INT,
id_cs INT,
dt DATETIME,
FOREIGN KEY(id_as) REFERENCES A(id_a),
FOREIGN KEY(id_bs) REFERENCES...


insert foreign keys with trigger

from Databases http://ift.tt/29YskMl
via IFTTT
Previous
Next Post »
Thanks for your comment