postgre复制表数据
来源:互联网 发布:纽约客 人工智能 漫画 编辑:程序博客网 时间:2024/05/03 22:28
说明:复制表(只复制结构,源表名:a 新表名:b)
select * into b from a where 1<>1
说明:拷贝表(拷贝数据,源表名:a 目标表名:b)
insert into b(a, b, c) select d,e,f from b;
说明:显示文章、提交人和最后回复时间
select a.title,a.username,b.adddate from table a,(select
max(adddate) adddate from table where table.title=a.title)
b
说明:外连接查询(表名1:a 表名2:b)
select a.a, a.b, a.c, b.c, b.d, b.f from a LEFT OUT JOIN b ON a.a =
b.c
说明:日程安排提前五分钟提醒
select * from 日程安排 where
datediff('minute',f开始时间,getdate())>5
说明:两张关联表,删除主表中已经在副表中没有的信息
delete from info where not exists ( select * from infobz where
info.infid=infobz.infid )
select * into b from a where 1<>1
说明:拷贝表(拷贝数据,源表名:a 目标表名:b)
insert into b(a, b, c) select d,e,f from b;
说明:显示文章、提交人和最后回复时间
select a.title,a.username,b.adddate from table a,(select
max(adddate) adddate from table where table.title=a.title)
b
说明:外连接查询(表名1:a 表名2:b)
select a.a, a.b, a.c, b.c, b.d, b.f from a LEFT OUT JOIN b ON a.a =
b.c
说明:日程安排提前五分钟提醒
select * from 日程安排 where
datediff('minute',f开始时间,getdate())>5
说明:两张关联表,删除主表中已经在副表中没有的信息
delete from info where not exists ( select * from infobz where
info.infid=infobz.infid )
0 0
- postgre复制表数据
- 在Postgre中通过查询数据字典获得表结构
- postgre循环插入模拟数据
- postgre数据迁移到mysql
- postgre删除数据表重复数据
- postgre表空间管理
- 表复制和数据复制
- mysql,postgre 处理date数据 和分页
- postgre 系统表对象说明
- 复制表结构数据
- 数据库表数据复制
- 复制表数据
- 复制表数据
- plsql复制表数据
- 复制表的数据
- 数据库表数据复制
- mongoVal 复制表数据。
- sql 表数据复制
- Mat - 基本图像容器
- 影响SEO优化的关键优化因素
- TCP的三次握手及其抓包
- Rational Rose与UML教程
- jquery mobile基础
- postgre复制表数据
- 【后缀自动机】[SPOJ LCS2]Longest Common Substring II
- cocos2d-x lua 使用http(下载图片, POST JSON)
- 黑马程序员——Java基础-----正则表达式
- Target runtime Apache Tomcat v7.0 is not defined.
- grails不能调试
- 第十四周项目 处理C++源代码的程序
- UGUI - ScrollView
- 第十四周项目1(1)-小玩文件