Given the following table:
CREATE table1 (a INTEGER PRIMARY KEY) TYPE=INNODB;
It is possible to create a relation between table1 i table2 using the
following syntax:
CREATE table2 (a INTEGER PRIMARY KEY, b INTEGER, c INTEGER, FOREIGN
KEY(b) REFERENCES table1(a)) TYPE=INNODB;
How can I make that relation within the column definition? This won't
work:
CREATE table2 (a INTEGER PRIMARY KEY, b INTEGER REFERENCES table1(a), c
INTEGER) TYPE=INNODB;
Sincerly,
Zeljko