我不明白这个查询有什么问题?查询工具不想在 PostgreSQL 中创建表。
CREATE TABLE article (
article_id bigint(20) NOT NULL auto_increment,
article_name varchar(20) NOT NULL,
article_desc text NOT NULL,
date_added datetime default NULL,
PRIMARY KEY (article_id)
);
最佳答案
首先 bigint(20) not null auto_increment
将不起作用,只需使用 bigserial primary key
。那么datetime
就是PostgreSQL中的timestamp
。总而言之:
CREATE TABLE article (
article_id bigserial primary key,
article_name varchar(20) NOT NULL,
article_desc text NOT NULL,
date_added timestamp default NULL
);
关于postgresql - 在 postgreSQL 中创建表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9826833/