467,185 Members | 1,238 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,185 developers. It's quick & easy.

alter query

hi ,

i have some simple doubt in DB2
1. can we disable or enable an INDEX.
2. can we drop a column from a table .
3. can we change the datatype of a column i.e say from varchar to
integer

Please help me update my knowledge.

thanks
bikash

Mar 24 '06 #1
  • viewed: 1625
Share:
3 Replies
bi******@in.ibm.com wrote:
hi ,

i have some simple doubt in DB2
1. can we disable or enable an INDEX.
What do you have in mind with disable/enable? Should the index not be used
during queries or not being maintained during DML statements?
2. can we drop a column from a table .
Not yet. But the Control Center provides a way to do that.
3. can we change the datatype of a column i.e say from varchar to
integer


No.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany
Mar 24 '06 #2
bi******@in.ibm.com wrote:
hi ,

i have some simple doubt in DB2
1. can we disable or enable an INDEX. DROP INDEX.... 2. can we drop a column from a table . In DB2 V8 for zOS yes. In DB2 for LUW this will be supported in Viper,
today (V8.2) there is GUI driven support in the control center. 3. can we change the datatype of a column i.e say from varchar to
integer

In DB2 for LUW you can INCREASE the length of a VARCHAR column.
In Viper you will be able to do any alter which cannot cause loss of data.
VARCHAR->INTEGER: No
INTEGER->VARCHAR: I think yes in Viper.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Mar 24 '06 #3
Serge Rielau wrote:
bi******@in.ibm.com wrote:
hi ,

i have some simple doubt in DB2
1. can we disable or enable an INDEX.

DROP INDEX....
2. can we drop a column from a table .

In DB2 V8 for zOS yes. In DB2 for LUW this will be supported in Viper,
today (V8.2) there is GUI driven support in the control center.
3. can we change the datatype of a column i.e say from varchar to
integer

In DB2 for LUW you can INCREASE the length of a VARCHAR column.
In Viper you will be able to do any alter which cannot cause loss of
data.
VARCHAR->INTEGER: No
INTEGER->VARCHAR: I think yes in Viper.

Cheers
Serge

Just be careful on the GUI driven option as I believe the underlying
task is to drop and recreate the table?

Bob
Mar 26 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Heist | last post: by
7 posts views Thread by Jon Combe | last post: by
1 post views Thread by boonkit@gmail.com | last post: by
7 posts views Thread by pb648174 | last post: by
reply views Thread by Gianfranco | last post: by
2 posts views Thread by Jeff_in_MD | last post: by
6 posts views Thread by Barry | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.