我正在努力让这个工作,但我不明白SQL如何在基础之外工作。你能在这找到错误吗?
CREATE TABLE lil_urls (
id varchar(255) NOT NULL default '',
url text,
date timestamp(14) NOT NULL,
PRIMARY KEY (id)
) TYPE=MyISAM;
我目前在PhPMyAdmin中收到此错误:
#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 '(14) NOT NULL,
PRIMARY KEY (id)' at line 4
感谢您的帮助!
答案 0 :(得分:0)
正确的语法是
CREATE TABLE lil_urls (
id varchar(255) NOT NULL default '',
url text,
date timestamp NOT NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM;
TYPE
已不再使用,您需要使用ENGINE
并且无需指定timestamp