随笔分类 -  DB2

摘要:查询Sequences值: select schema.table_SEQ.NEXTVAL from sysibm.sysdummy1 重置Sequences值: ALTER SEQUENCE schema.table_SEQ RESTART WITH 1; 阅读全文
posted @ 2018-07-02 16:28 fosonR 阅读(183) 评论(0) 推荐(0)
摘要:改变字段长度: ALTER table schema.table_name ALTER column_name set data type VARCHAR(10); call sysproc.admin_cmd('reorg table schema.table_name '); call sysproc.admin_cmd('runstats on table schema.table_n... 阅读全文
posted @ 2018-04-28 11:42 fosonR 阅读(183) 评论(0) 推荐(0)
摘要:1、行范围超出总行数,也能查到总行数记录 2、行范围超出总行数,不能查到总行数记录 阅读全文
posted @ 2018-02-05 10:01 fosonR 阅读(445) 评论(0) 推荐(0)
摘要:#!/usr/bin/env python# -*- coding:utf-8 -*- ########################## excute python2.7.13# sudo pip install ibm_db#########################import ibm 阅读全文
posted @ 2017-08-18 10:15 fosonR 阅读(5629) 评论(0) 推荐(0)
摘要:查看对应SQL的执行计划 分析程序包 db2expln -d 数据库名 -i -g -c 模式名-p程序包 -s 0 -t db2expln -d 数据库名 -i -g -c 模式名-p程序包 -s 0 -o文件名 分析sql 语句 db2expln -d 数据库名 -i -g -q sql语句 - 阅读全文
posted @ 2017-08-01 17:36 fosonR 阅读(6521) 评论(0) 推荐(0)