postgresql create table:
BEGIN; CREATE TABLE t1 ( id BIGSERIAL PRIMARY KEY,address INTERGER DEFAULT '',name VARCHAR UNIQUE NOT NULL,did VARCHAR,count INTERGER NOT NULL,money DOUBLE PRECISION NOT NULL DEFAULT 0,CONSTRAINT money_check (money >= 0),ratio REAL NOT NULL DEFAULT 0,tm TIMESTAMP,pass BOOLEAN NOT NULL DEFAULT FALSE,); CREATE TABLE t2 ( p_id BITINT NOT NULL,ticket_id BITINT NOT NULL,"type" VARCHAR NOT NULL,PRIMARY KEY (p_id,ticket_id) ); CREATE INDEX ticket_player ON t2(p_id); COMMIT;原文链接:https://www.f2er.com/postgresql/195365.html