postgresql添加字段
ALTER TABLE jiangan_config ADD COLUMN article text NOT NULL DEFAULT '';
pg_dump -s database_name -t table_name
查看表定义:
CREATE TABLE hetong (
id integer NOT NULL,
create_time timestamp with time zone NOT NULL,
edit_time timestamp with time zone NOT NULL,
check_status integer NOT NULL,
message text NOT NULL,
zkzh character varying(50) NOT NULL,
bscj double precision NOT NULL,
mscj double precision NOT NULL,
zcj double precision NOT NULL,
bspm smallint NOT NULL,
zpm smallint NOT NULL,
is_mianshi boolean NOT NULL,
is_tijian boolean NOT NULL,
tx character varying(100),
xm character varying(10) NOT NULL,
xb character varying(1) NOT NULL,
hf character varying(1) NOT NULL,
lxdh character varying(20) NOT NULL,
bkgw character varying(50) NOT NULL,
mz character varying(5) NOT NULL,
zzmm character varying(7) NOT NULL,
xl character varying(4) NOT NULL,
xw character varying(4) NOT NULL,
bysj date,
byyx character varying(50) NOT NULL,
zy character varying(50) NOT NULL,
stzk character varying(2) NOT NULL,
cjgzsj date,
xgzdwjgw character varying(50) NOT NULL,
zgsj character varying(60) NOT NULL,
jtzz character varying(100) NOT NULL,
grjl text NOT NULL,
jcqk text NOT NULL,
jtzycyqk text NOT NULL,
creater_id integer NOT NULL,
is_pay boolean NOT NULL,
config integer NOT NULL,
zc character varying(50) NOT NULL,
zgzs character varying(50) NOT NULL,
hjszd character varying(50) NOT NULL,
kssf character varying(10) NOT NULL
);
ALTER TABLE public.jiangan_hetong OWNER TO puser;
--
-- Name: jiangan_hetong_id_seq; Type: SEQUENCE; Schema: public; Owner: puser
--
CREATE SEQUENCE jiangan_hetong_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.jiangan_hetong_id_seq OWNER TO puser;
--
-- Name: jiangan_hetong_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: puser
--
ALTER SEQUENCE jiangan_hetong_id_seq OWNED BY jiangan_hetong.id;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: puser
--
ALTER TABLE ONLY jiangan_hetong ALTER COLUMN id SET DEFAULT nextval('jiangan_hetong_id_seq'::regclass);
--
-- Name: jiangan_hetong_pkey; Type: CONSTRAINT; Schema: public; Owner: puser; Tablespace:
--
ALTER TABLE ONLY jiangan_hetong
ADD CONSTRAINT jiangan_hetong_pkey PRIMARY KEY (id);
--
-- Name: jiangan_hetong_3a252d5f; Type: INDEX; Schema: public; Owner: puser; Tablespace:
--
CREATE INDEX jiangan_hetong_3a252d5f ON jiangan_hetong USING btree (creater_id);
--
-- Name: jiangan_hetong_creater_id_733fcbc985678220_fk_accounts_user_id; Type: FK CONSTRAINT; Schema: public; Owner: puser
--
ALTER TABLE ONLY jiangan_hetong
ADD CONSTRAINT jiangan_hetong_creater_id_733fcbc985678220_fk_accounts_user_id FOREIGN KEY (creater_id) REFERENCES accounts_user(id) DEFERRABLE INITIALLY DEFERRED;
--
-- PostgreSQL database dump complete
--
postgresql添加字段的更多相关文章
- 【PostgreSQL】PostgreSQL添加新服务器连接时,报错“Server doesn't listen ”,已解决。
PostgreSQL添加新的服务器连接时,报错:
- Sql动态添加字段的正确姿势
如何给指定表动态添加字段? 一.创建一张表[Tbl_AutoFileds] (tableName表名,fieldName字段名,dataType数据类型,length长度 isnull 是否允许为n ...
- paip.解决 数据库mysql增加列 字段很慢添加字段很慢
paip.解决 数据库mysql增加列 字段很慢添加字段很慢 #环境如下: mysql5.6 数据仅仅3w alter table xxx add column yyy int default ...
- MySQL添加字段和删除字段
MySQL添加字段应该如何实现呢?这是很多刚刚接触MySQL数据库的新人都提到过的问题,下面就为您介绍MySQL添加字段和删除字段的方法,希望对您能有所启迪. MySQL添加字段: alter tab ...
- 向已写好的多行插入sql语句中添加字段和值
#region 添加支款方式--向已写好的多行插入sql语句中添加字段和值 public int A_ZhifuFS(int diqu) { ; string strData = @"SEL ...
- mysql 添加字段、删除字段、调整字段顺序 转
ALTER TABLE — 更改表属性添加字段: alter table `user_movement_log`Add column GatewayId int not null default 0 ...
- PHPCMS v9栏目添加字段及描述编辑器修改方法
为PHPCMS v9栏目添加字段和把描述的textarea编辑器变成fceditor编辑器的方法.如下: 1. 添加数据库字段:description1,添加位置:v9_catetory表 2. 在c ...
- oracle数据库的建表,删除字段,添加字段,修改字段,修改字段......
1. 使用oracle创建一张表: SQL> create table loginuser( id ,), username ), password ), email ), descriable ...
- Sql 语句添加字段、修改字段类型、默认值语法
Sql 语句添加字段 ,) not null --修改类型 alter Table bbs ) Sql 语句修改默认值 alter table 表名 drop constraint 约束名字 --删除 ...
随机推荐
- Java面试题—初级(1)
1.一个".java"源文件中是否可以包括多个类(不是内部类)?有什么限制? 可以有多个类,但只能有一个public的类,并且public的类名必须与文件名相一致. 2.Java有 ...
- Protobuf java版本安装步骤
1,安装mavena.下载apache-maven-3.2.5,链接:http://mirrors.hust.edu.cn/apache//maven/maven-3/3.2.5/binaries/b ...
- 对Spring IOC和AOP的理解
控制反转(IOC)是什么?(理解好Ioc的关键是要明确"谁控制谁,控制什么,为何是反转(有反转就应该有正转了),哪些方面反转了") 1.Ioc-Inversion of Contr ...
- requests之一:HTTP OAUTH认证(1)图形解释流程
- CentOS在线安装Mysql5.7
一.通过Yum命令安装 1.下载rpm安装源 官方地址:https://dev.mysql.com/downloads/repo/yum/ rpm文件地址:https://dev.mysql.com/ ...
- 学习HTML的第二次课
1.图片 <img / > 图片的格式: 1.1BMP 占用空间大,颜色丰富. 1.2JPEG 有损压缩,占用空间较小. 1.3GIF 多帧动图,支持透明色. 1.4PNG 无损压缩,位图 ...
- 典型分布式系统分析:MapReduce
在 <分布式学习最佳实践:从分布式系统的特征开始(附思维导图)>一文中,提到学习分布式系统的一个好方法是思考分布式系统要解决的问题,有哪些衡量标准,为了解决这些问题:提出了哪些理论.协议. ...
- BeautifulSoup 用法
一.标签选择器 1.子节点contents ,child(迭代器), 2.子孙节点 descendants(迭代器) 3.父节点 parent 4.祖节点 parents 5.兄弟节点 next_s ...
- tkinter 创建登陆注册界面
import tkinter as tk from tkinter import messagebox #设置窗口居中 def window_info(): ws = window.winfo_scr ...
- Struts2--标签tag
在Struts2框架中提供了一套标签库,可以与struts2无缝结合. 数据标签a.action.bean.date.debug.i18n.include.param.property.push.se ...