Sie sind nicht angemeldet.
|
|
Quellcode |
1 2 3 |
CREATE TABLE eltern(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB;
CREATE TABLE kind(id INT, eltern_id INT, INDEX par_ind (eltern_id),
FOREIGN KEY (eltern_id) REFERENCES eltern(id)) TYPE=INNODB;
|
|
|
Quellcode |
1 |
INDEX par_ind (eltern_id) |
crushcoder
God





Zitat
INDEX [index_name] [index_type] (index_col_name,...)
Zitat
DROP INDEX index_name
Gott hat die Welt ja nur in sieben Tagen erschaffen können, weil es keine installierte Basis gab.
|
|
Quellcode |
1 |
userid INT UNSIGNED AUTO_INCREMENT primary key |
|
|
Quellcode |
1 2 3 4 |
[....] userid INT UNSIGNED AUTO_INCREMENT primary key [...] FOREIGN KEY (userid) REFERENCES user(userid) |
Zitat
#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key
|
|
Quellcode |
1 |
userid INT UNSIGNED NOT NULL |

-