第一個建表語句:
DROP TABLE IF EXISTS "public"."eshop_city";
CREATE TABLE "public"."eshop_city" (
"id" serial8 NOT NULL PRIMARY KEY,
"del_flag" int2,
"create_user" int4,
"update_user" int4,
"create_time" timestamp(6) NOT NULL,
"update_time" timestamp(6)
)
;
COMMENT ON COLUMN "public"."eshop_city"."id" IS '全國城市表主鍵id';
COMMENT ON COLUMN "public"."eshop_city"."del_flag" IS '是否軟刪除:0;否,1:是';
COMMENT ON COLUMN "public"."eshop_city"."create_user" IS '創建用戶id';
COMMENT ON COLUMN "public"."eshop_city"."update_user" IS '更新用戶id';
COMMENT ON COLUMN "public"."eshop_city"."create_time" IS '創建時間';
COMMENT ON COLUMN "public"."eshop_city"."update_time" IS '更新時間';
COMMENT ON TABLE "public"."eshop_city" IS '全國城市表';
查詢表結構
select tablename from pg_tables where schemaname='public'
用navicat12看不到postgre數據庫裏的表
更新navicat12到15就可以了
學習文檔: