`
qingyujingyu427
  • 浏览: 27000 次
社区版块
存档分类
最新评论

db2 modify column type

    博客分类:
  • db2
阅读更多
DB2 is so hard to use, also its documentation... Even such a simple operation, it takes me much time...
 
Generally, char->varchar, smallint->integer, you can just modify the column through this sql:
alter table [table name] alter column [column name] set data type [new type]
 
But, if new column type is not compatible with existing column type, you need to modify it as follows:
 
1. maybe need to export old column data
2. drop the column: alter table [table name] drop column [column name]
3. add new column: alter table [table name] add column [column name] [column type]
4. reorg table [table name]
5. maybe need to import original data
分享到:
评论

相关推荐

    modify_headers-0.7.1.1-fx.xpi

    File modifyHeaders = new File(pluginPath); profile.addExtension(modifyHeaders); profile.setPreference("modifyheaders.headers.count", 1); profile.setPreference("modifyheaders.headers.action0", ...

    liquibase-modify-column-3.1.zip

    liquibase-hibernate.zip,Hibernate集成的Liquibase扩展,包括基于更改的

    Oracle对字段的增删改方法分享

    alter table table_name modify column_name varchar (10); 此为标准SQL,对任何数据库都适用  修改字段名: alter table 表名 rename column 旧字段名 to 新字段名 例: alter table table_name rename column

    modify-http-headers Chrome插件-20190820

    modify-http-headers Chrome插件, 测试可用,包含插件安装文档

    modify_headers.zip

    一款谷歌浏览器插件,辅助http头注入的检测,欢迎喜欢的朋友下载

    oracle数据库安装

    Alter table table_name modify column_name new_datatype 修改列名 Alter table…rename Alter table table_name rename column oldname to newname 删除列 直接删除 Alter table…drop column Alter table table_...

    oracle数据备份

    Alter table table_name modify column_name new_datatype 修改列名 Alter table…rename Alter table table_name rename column oldname to newname 删除列 直接删除 Alter table…drop column Alter table table_...

    前端开源库-less-modify-var-loader

    前端开源库-less-modify-var-loader修改var加载器更少,webpack加载器更好地替换更少的变量

    ORCLE 表中列的修改

    修改一列: alter table emp4 modify test varchar2(20); 删除一列: alter table emp4 drop column test; 这里要注意几个地方,首先,增加和修改列是不需要加关键字COLUMN,否则会报错ora-00905。 其次,对删除...

    EMI application notes_Modify-print.pdf

    EMI application notes_Modify-printpdf,EMI application notes_Modify-print

    modify-header-value-http-0.1.3.crx

    Modify Header Value (HTTP Headers) 这个插件的主要作用是对Chrome的HTTP request headers进行添加、修改和过滤等操作。当我们访问网站的时候,某些网站服务器会对访问网站的浏览器Header信息进行判断,然后决定用...

    modifyName.zip

    实用小程序工具 之 批量修改文件名 csdn博客地址: https://gudianxiaoshuo.blog.csdn.net/article/details/112724711

    SAP自学系列-后勤系统报表查询(Modify)[定义].pdf

    SAP自学系列-后勤系统报表查询(Modify)[定义].pdf

    Modify MergeSort share

    Modify MergeSort, which makes the original MergeSort quicker. In the Modifies, combines the InsertionSort, is a kind of new idea to complich.

    mysql alter table修改表命令整理

    MYSQL ALTER TABLE命令用于修改表结构,例如添加/修改/删除字段、索引、主键等等,本文章通过...ADD [COLUMN] create_definition [FIRST | AFTER column_name ] or ADD INDEX [index_name] (index_col_name,...) or ADD

    modify padavan老毛子固件解包打包

    ubuntu下su运行,所有文件需要可以执行权限。 ./modify.sh e rom.trx是解包解包后不要忘了给squashfs-root/文件夹读写权限 ./modify.sh c newrom.trx是打包

    Media Firmware Modify Tool V1.16.rar

    炬力ATS2825\ATS2823\ATS2819固件修改工具Media Firmware Modify Tool V1.16.rar

    modify_headers-0.7.0.2-fx+sm.xpi

    modify_headers-0.7.0.2-fx+sm.xpi

    BatchMD5Modify1.0.rar

    我们在做游戏资源或者其他资源的时候,经常要用到加密。否则游戏资源包被破解之后游戏资源就公开可见了,所以需要用到这款MD5加密软件,非常的好用

Global site tag (gtag.js) - Google Analytics