就我所知,我的查询似乎还可以:
CREATE TABLE PORTAL_NOTES (
id numeric NOT NULL,
school_id numeric,
syear numeric(4,0),
title character varying(255),
content character varying(5000),
sort_order numeric,
published_user numeric,
published_date timestamp(0),
start_date date,
end_date date,
published_profiles character varying(255)
);
但是我得到这个错误:
#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 '(1) , start_date date, end_date date, published_profiles characte' at line 9
谁能帮我在这里调试问题?
最佳答案
尝试这个 :
CREATE TABLE PORTAL_NOTES (
id numeric NOT NULL,
school_id numeric,
syear numeric(4,0),
title character varying(255),
content character varying(5000),
sort_order numeric,
published_user numeric,
published_date timestamp,
start_date date,
end_date date,
published_profiles character varying(255)
);
问题是因为您在
timestamp(0)
中设置了长度,所以不需要长度。关于mysql - 无法解决MySQL错误#1064,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30522870/