· 9 years ago · Dec 02, 2016, 02:36 PM
1SQL dotaz:
2
3
4
5
6
7CREATE TABLE IF NOT EXISTS `rooms` (
8 `cislo_izby` int(5) NOT NULL,
9 `dostupnost` enum('volna','obsadena','','') NOT NULL,
10 `cena` VARCHAR(15) NOT NULL,
11 `skody` varchar(1000) NOT NULL,
12 `lozka` int(2) DEFAULT NULL,
13 `kapacita` int(2) DEFAULT NULL,
14 PRIMARY KEY (`cislo_izby`),
15 FOREIGN KEY cena REFERENCES Cena_miestnosti(ID_Ceny)
16) ENGINE=MyISAM DEFAULT CHARSET=latin1;
17MySQL hlási: Dokumentácia
18
19#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REFERENCES Cena_miestnosti(ID_Ceny)
20) ENGINE=MyISAM DEFAULT CHARSET=latin1' at line 9