postgreSQL创建表的SQL语句

语句如下

-- Table: public.accounts

-- DROP TABLE public.accounts;

CREATE TABLE public.accounts
(
    account text COLLATE pg_catalog."default" NOT NULL,
    type smallint,
    balance numeric,
    tran_count integer,
    CONSTRAINT account_pkey PRIMARY KEY (account)
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE public.accounts
    OWNER to postgres;

COMMENT ON COLUMN public.accounts.account
    IS '账户地址';

COMMENT ON COLUMN public.accounts.type
    IS '账户类型(1普通账户、2合约账户)';

COMMENT ON COLUMN public.accounts.balance
    IS '余额,单位是Wei';

COMMENT ON COLUMN public.accounts.tran_count
    IS '交易次数';

~~~

未经允许不得转载:朱邦邦的博客 » postgreSQL创建表的SQL语句

赞 (0)

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址