What's wrong with this SQLite query ?
Unsolved
General and Desktop
-
CREATE TABLE IF NOT EXISTS `Pages_has_Dependencies` ( `page_ID` INT NOT NULL, `depe_ID` INT NOT NULL, PRIMARY KEY (`page_ID`, `depe_ID`), INDEX `fk_Pages_has_Dependencies_Dependencies1_idx` (`depe_ID` ASC), INDEX `fk_Pages_has_Dependencies_Pages_idx` (`page_ID` ASC), CONSTRAINT `fk_Pages_has_Dependencies_Pages` FOREIGN KEY (`page_ID`) REFERENCES `Pages` (`page_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_Pages_has_Dependencies_Dependencies1` FOREIGN KEY (`depe_ID`) REFERENCES `Dependencies` (`depe_ID`) ON DELETE NO ACTION ON UPDATE NO ACTION);
Error that i am getting is :
QSqlError("1", "Unable to execute statement", "near \"INDEX\": syntax error")
Can anyone tell me what's wrong with this sql statements .
-
Hi
Maybe its called create index ?
http://www.tutorialspoint.com/sqlite/sqlite_indexes.htm