惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
H
Help Net Security
B
Blog RSS Feed
G
Google Developers Blog
博客园 - 司徒正美
MongoDB | Blog
MongoDB | Blog
量子位
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog
P
Proofpoint News Feed
小众软件
小众软件
人人都是产品经理
人人都是产品经理
云风的 BLOG
云风的 BLOG
V
V2EX
月光博客
月光博客
C
Check Point Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
A
Arctic Wolf
Help Net Security
Help Net Security
Schneier on Security
Schneier on Security
D
DataBreaches.Net
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Palo Alto Networks Blog
T
Tenable Blog
L
LangChain Blog
Attack and Defense Labs
Attack and Defense Labs
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
Forbes - Security
Forbes - Security
F
Fortinet All Blogs
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Y
Y Combinator Blog
WordPress大学
WordPress大学
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Engineering at Meta
Engineering at Meta
NISL@THU
NISL@THU
GbyAI
GbyAI
博客园 - Franky
S
Secure Thoughts
有赞技术团队
有赞技术团队
PCI Perspectives
PCI Perspectives
U
Unit 42

博客园 - wasd

pear安装步骤 linux定时任务的设置 C语言字符串拆分,打开关闭文件 - wasd - 博客园 js-tips 用optgroup 禁用select中的option方法 - wasd - 博客园 addslashes、get_magic_quotes_gpc函数、stripslashes函数(转来记录一下) - wasd - 博客园 Linux 强制卸载软件 - wasd - 博客园 Setup locally visual host - wasd B:X星球的身份证系统 B:有道搜索框 B:有道饭团 A:另类的异或 C:Sibonacci - wasd - 博客园 CakePHP支持DB2 PHP 的变量 - wasd - 博客园 DB2 SQLSTATE 消息异常 JDBC中Preparedstatement使用小结 及JDBC插入数据后获得Last insert ID 并行计算简介 PB3编译adobe的例子photoviewer时错误处理
DB2常用语句记录
wasd · 2010-12-18 · via 博客园 - wasd

用一条语句插入也行
insert   into   newuser(username,password,email)   values( 'Amy ', '1234 ', 'Amy@ss.com ')
,( 'Judy ', '1234 ', 'Judy@ss.com ')

添加新实例

db2 catalog tcpip node YourName remote ***.***.***.***(IP地址) server 50000(端口)
db2 catalog database newName at node YourName

连接数据库

connect to DBName  user UserName using PassWord

select * from TableName where cumlumNameA ='abc' and cumlumNameB ='bcd' order by cumlumNameA desc/asc fetch first 10 rows only

DB2 下导出表结构及数据 

su db2inst - 进入db2权限模式 

任意建立一个文件夹子 mkdir data 

进入文件夹子 cd data 

导出表结构:使用db2look -d 库名 -e -u 用户名 -l -o exoa.sql 

导出数据:使用db2move 库名 export 

可使用以下命令查看: db2look -help or db2move -help 

打包已导出的表结构与数据 tar zcvf 目录名.tar.gz 目录名/ 

在新的db2导入数据 

创建数据库: db2 create db 库名 

导入表结构操作:db2 -tvf 文件名.sql 

导入数据操作:db2move 新建库名 import 

查询分析器命令,连接服务器命令

connect to devba user db2inst1 using passw0rd