标签:
psql -U username -d dbname -h hostip -p port
\l
\c dbname
\d
\d tablename
\d+ tablename
q
create table REL_CROSS_NODE(ID integer, CROSS_ID integer);
drop table REL_CROSS_NODE;
alter table [表名] add column [字段名] [类型];
alter table [表名] rename column [旧字段名] to [新字段名];
alter table [表名] drop column [字段名];
insert into [表名] (字段1,字段2) values (值1,值2);
delete from [表名] where [该行特征];
update [表名] set [目标字段名]=[目标值] where [该行特征]
drop table [表名];
\q
(select node_id from node where node_id=1 or node_id=2) except (select node_id from node where node_id=1); node_id --------- 2 (1 row)
标签:
原文地址:http://www.cnblogs.com/kaituorensheng/p/4667160.html