Help us understand the problem. What is going on with this article?

DB2(9.7)でCHAR型の列のサイズを変更する

DB2(9.7)でCHAR型3桁の列のサイズを4桁にする必要があったのでコマンドをメモします

ALTER TABLE ALTER COLUMN SET DATA TYPEを使用して

ALTER TABLE {スキーマ名}.{テーブル名} ALTER COLUMN {カラム名} SET DATA TYPE CHAR(4);

再編成が必要な場合

REORG TABLE {テーブル名}

参考

ALTER TABLEの細かい仕様については以下のURLを参照しました。
https://www.ibm.com/support/knowledgecenter/ja/SSEPGG_9.7.0/com.ibm.db2.luw.sql.ref.doc/doc/r0000888.html

REORGの細かい仕様については以下のURLを参照しました。
https://www.ibm.com/support/knowledgecenter/ja/SSEPGG_9.7.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0001966.html

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away