postgresql 创建表语句

 

 

 法一:

CREATE TABLE messagebox_aige
(
  tuid serial NOT NULL,
  brandname character varying,
  incomingcall character varying,
  incomingtime timestamp(6) without time zone,
   CONSTRAINT messagebox_aige_pkey PRIMARY KEY (tuid )
)

 

注意创建主键的写法。

 

法二:

CREATE TABLE messagebox_aige2
(
  tuid serial NOT NULL PRIMARY key ,
  brandname character varying,
  incomingcall character varying,
  incomingtime timestamp(6) without time zone
)

 

 

 

 

 

 

 

你可能感兴趣的:(postgresql)