0
CREATE TABLE `pastebin` (
`pid` int(11) NOT NULL auto_increment,
`poster` varchar(16) default NULL,
`posted` datetime default NULL,
`code` text,
`parent_pid` int(11) default '0',
`format` varchar(16) default NULL,
`codefmt` mediumtext,
`codecss` text,
`domain` varchar(255) default '',
`expires` DATETIME,
`expiry_flag` ENUM('d','m', 'f') NOT NULL DEFAULT 'm',
PRIMARY KEY (`pid`),
KEY `domain` (`domain`),
KEY `parent_pid`,
KEY `expires`
);
創建數據庫和複製粘貼的SQL查詢到的phpMyAdmin後,我收到以下錯誤:這個MySQL查詢中的索引定義有什麼問題?
#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 '
KEY `expires`
)' at line 16
謝謝,這似乎工作。我真的需要學習MySQL ... – PHLAK 2009-08-18 05:36:39