你是什么系统??
看的我pg系统:
CREATE TABLE announcement
(
announcement_title "varchar"(50) NOT NULL,
announcement_content text NOT NULL,
announcement_datetime "timestamp" NOT NULL DEFAULT now(),
announcement_auther "varchar"(50) NOT NULL,
announcement_id "char"(36) DEFAULT new_uuid(),
announcement_isfront bool DEFAULT false
)
WITH OIDS;“DEFAULT now()”就是。
看的我pg系统:
CREATE TABLE announcement
(
announcement_title "varchar"(50) NOT NULL,
announcement_content text NOT NULL,
announcement_datetime "timestamp" NOT NULL DEFAULT now(),
announcement_auther "varchar"(50) NOT NULL,
announcement_id "char"(36) DEFAULT new_uuid(),
announcement_isfront bool DEFAULT false
)
WITH OIDS;“DEFAULT now()”就是。
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresp
onds to your MySQL server version for the right syntax to use near '"timestamp"
not null default now())' at line 1照你的语法写的
create table t(day "timestamp" not null default now());