HGDBPG表中添加删除列的方法
HGDB表中添加删除列:
highgo=# \d test
Table "public.test"
Column | Type | Modifiers
--------+---------+------------
id | integer | default 15
no | integer |
highgo=# select * from test;
id | no
----+----
15 | 1
15 | 2
15 |
(3 rows)
highgo=# alter table test add column name varchar(10);
ALTER TABLE
highgo=# select * from test;
id | no | name
----+----+------
15 | 1 |
15 | 2 |
15 | |
(3 rows)
highgo=# insert into test (no,name) values (1,'a');
INSERT 0 1
highgo=#
highgo=# select * from test;
id | no | name
----+----+------
15 | 1 |
15 | 2 |
15 | |
15 | 1 | a
(4 rows)
highgo=# alter table test drop column name;
ALTER TABLE
highgo=# select * from test;
id | no
----+----
15 | 1
15 | 2
15 |
15 | 1
(4 rows)
上一篇: JAVABEAN EJB POJO区别
下一篇: 微信小程序开发——navigator组件