473,387 Members | 1,597 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
3 1746
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Heist | last post by:
Hi, I just want to know to turn this: CREATE TABLE . ( NOT NULL , (50) COLLATE French_CI_AS NULL , NOT NULL , (50) COLLATE French_CI_AS NOT NULL , NULL , NULL ) ON into this:
7
by: Jon Combe | last post by:
I have created the following test SQL code to illustrate a real problem I have with some SQL code. CREATE TABLE JCTable ( CustomerName varchar(50) ) ALTER TABLE JCTable ADD CustomerNo int...
1
by: boonkit | last post by:
I try to get better performance by implementing this: http://dev.mysql.com/doc/mysql/en/alter-table.html "ORDER BY allows you to create the new table with the rows in a specific order. Note...
7
by: pb648174 | last post by:
I am trying to add a column to a temp table and then immeditaely query against that new column. If I do this in Query Analyzer it works fine as long as there is a go in between, but I can't use a...
0
by: Gianfranco | last post by:
Hi, I'm not familiar at access and at VBA either, so I need some help or at least some hint please. I have table "availabledrivers", coming from a query to the table "drivers". Then I have a table...
4
by: Jeff Kish | last post by:
Hi. I have a database I need to supply something (I'm assuming a t-sql script.. maybe something else is better) to update customer tables with. The operations include mostly changing varchar...
2
by: Jeff_in_MD | last post by:
Hi, I'm trying to add a column to a table, then update that column with a query. This is all within a single batch. Sqlcmd gives me an error on the update, saying "invalid column xxx", because...
6
by: Barry | last post by:
In sqlserver 2000 I have a UDF which works fine but I want to make a change to it. When I do an ALTER FUNCTION ... I get an error saying that I can't alter the function because it is referenced by...
1
by: prosad | last post by:
hi, have a mysql query that orders entry by complaint category. this query is then used with mysql_fetch_array to generate table of records ordered by complaint and other parameters. i can alter...
1
by: Chris | last post by:
Hi, I am trying to run the following SQL through the DB2 command line for version 9.1.0: alter table SCHEMA.TABLE1 drop column A; alter table SCHEMA.TABLE2 alter column B set data type...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.