软件下载吧文章资讯

分类分类

使用Postgresql 实现快速插入测试数据

2024-03-08 08:50作者:下载吧

1.创建常规的企业信息表

create table t_centerprises(
objectid bigint not null, /*唯一编号(6位行政区号+6位sn)*/
divid uuid not null, /*行政区唯一代码*/
name text not null, /*企业名称*/
address text not null, /*企业地址*/
post text, /*企业邮编*/
contacts text, /*联系人*/
tel text, /*联系电话*/
fax text, /*传真*/
describe text, /*企业备注*/
date timestamp default now() not null, /*创建日期*/
constraint pk_centerprisess_objectid primary key (objectid),
constraint fk_centerprises_divid foreign key(divid) references ts_divisions(objectid) on delete cascade
);
create index idx_centerprises_divid on t_centerprises(divid);

展开全部

相关文章

说两句网友评论
    我要跟贴
    取消