sql >> Base de Datos >  >> RDS >> PostgreSQL

crear tabla en postgreSQL

Primero el bigint(20) not null auto_increment no funcionará, simplemente use bigserial primary key . Luego datetime es timestamp en PostgresSQL. En total:

CREATE TABLE article (
    article_id bigserial primary key,
    article_name varchar(20) NOT NULL,
    article_desc text NOT NULL,
    date_added timestamp default NULL
);