问两个问题,在DB2中怎样用SQL语句删除一个字段,怎样改变一个字段的类型?

问两个问题,在DB2中怎样用SQL语句删除一个字段,怎样改变一个字段的类型?

在MS-SQL中的语句好像在DB2中不行

---------------------------------------------------------------

很遗憾地告诉你:DB2不支持!
它仅可在原表上增加新的字段。
---------------------------------------------------------------

嘿嘿
是不支持删除的
---------------------------------------------------------------

查看表结构

db2 describe table user1.department
db2 describe select * from user.tables

类型转换(cast)

ip datatype:varchar
select cast(ip as integer)+50 from log_comm_failed

Published At
Categories with 数据库类
Tagged with
comments powered by Disqus