DB2
listenFeng.
这个作者很懒,什么都没留下…
展开
-
DB2学习笔记
查找相同id数大于1的数据删除Delete from 表格 where id in (select id from people group by id having count(id)>1);变更字段数据类型ALTER TABLE "WGHYX"."APPVERSION" ALTER "VERSION" SET DATA TYPE VARCHAR(25)添加字段ALTER TABLE "DHGL"."IR_DH_TASK_CUSTINFO" ADD COLUMN "IS_SCR原创 2021-03-02 16:36:43 · 1064 阅读 · 0 评论 -
DB2表注释拉取
应用场景:公司内网建好数据表之后迁移到客户线上时,通常无法附带导出注释,需要另行拉取表字段注释:SELECT *FROM ( SELECT 'comment on column ' || trim(t.TABSCHEMA) || '.' || t.TABNAME || '.' || t.COLNAME || ' is ' || '''' || t.REMARKS || '''' || ' GO' AS COMMENT FROM syscat. COLUMNS t )WHE原创 2021-02-25 11:54:04 · 617 阅读 · 0 评论