Difference between revisions of "Mysql setting constraints"
From MyWiki
Line 14: | Line 14: | ||
hostname varchar(30), | hostname varchar(30), | ||
notes varchar(100), | notes varchar(100), | ||
− | constraint | + | constraint myconst_1 |
− | FOREIGN KEY | + | FOREIGN KEY hostname |
REFERENCES sslhosts (hostname) | REFERENCES sslhosts (hostname) | ||
ON DELETE CASCADE ON UPDATE CASCADE | ON DELETE CASCADE ON UPDATE CASCADE |
Revision as of 12:17, 22 January 2019
CONSTRAINT education_ibfk_1 FOREIGN KEY (profile_id) REFERENCES Profile (profile_id) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT education_ibfk_2 FOREIGN KEY (institution_id) REFERENCES Institution (institution_id) ON DELETE CASCADE ON UPDATE CASCADE, CREATE TABLE notes ( hostname VARCHAR(30), notes VARCHAR(100), CONSTRAINT myconst_1 FOREIGN KEY hostname REFERENCES sslhosts (hostname) ON DELETE CASCADE ON UPDATE CASCADE );