View previous topic :: View next topic |
Author |
Message |
babun Beginner
Joined: 03 Aug 2005 Posts: 19 Topics: 9 Location: bangalore
|
Posted: Thu Aug 04, 2005 1:43 am Post subject: how can we deleted un-used column's in a database table |
|
|
how can we deleted un-used column's in a database table ?
can you people give me more solutions reg this ...
move is one technique ,,,do we have any other option to do ? _________________ babu |
|
Back to top |
|
|
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Aug 04, 2005 3:58 am Post subject: |
|
|
I am sorry, but I do not understand either of the posts.
Quote: | how can we deleted un-used column's in a database table ? |
What is the meaning of 'unused' here?
Quote: | move is one technique |
What is the meaning of 'move' here? _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
|
batu544 Beginner
Joined: 02 Aug 2005 Posts: 75 Topics: 27
|
Posted: Thu Aug 04, 2005 8:04 am Post subject: |
|
|
Hi,
As far as my knowledge , U can't delete a column from a table in DB2.
but in othe database lke ORACLE u can do it by using ALTER command.
I think one way to do is create a table having all the required column and load that table. _________________ Regards,
batu |
|
Back to top |
|
|
karthikeyan Beginner
Joined: 29 May 2004 Posts: 16 Topics: 4 Location: chennai
|
Posted: Thu Aug 04, 2005 12:11 pm Post subject: You cant Drop |
|
|
Hi
You can drop a column in the Oracle 9i but not in the earlier versions
But in DB2 we dont have that provision.So u have use that move what u said earlier |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Thu Aug 04, 2005 12:16 pm Post subject: |
|
|
Quote: |
But in DB2 we dont have that provision. So u have use that move what u said earlier
|
karthikeyan,
What exactly is a "move" ? If you want to drop a column from a table in DB2 z/os you need to drop and re-create(minus unused columns) the entire table.
Let me know what you mean by "move"
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
babun Beginner
Joined: 03 Aug 2005 Posts: 19 Topics: 9 Location: bangalore
|
Posted: Fri Aug 05, 2005 2:25 am Post subject: |
|
|
according to come sources,, the move means ,,,we can move the columns except un-used columns into some other table through move...n delete that table which having with un-used columns..
un-used column's ,,client said i am not going to use some of the columns in future n ask to delete those 2 columns,,,that is it..
u r opinion's are invited.. _________________ babu |
|
Back to top |
|
|
batu544 Beginner
Joined: 02 Aug 2005 Posts: 75 Topics: 27
|
Posted: Fri Aug 05, 2005 5:22 am Post subject: |
|
|
1. one way is create a new table except that unused column and load that table.
2. U can create a view by taking only used columns .
_________________ Regards,
batu |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Aug 05, 2005 5:59 am Post subject: |
|
|
Quote: |
according to come sources,, the move means ,,,we can move the columns except un-used columns into some other table through move...n delete that table which having with un-used columns..
|
babun,
There is no such thing called "MOVE" in DB2. As mentioned earlier you need to drop and re-create the table without the unwanted columns
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Last edited by kolusu on Fri Aug 05, 2005 8:47 am; edited 1 time in total |
|
Back to top |
|
|
batu544 Beginner
Joined: 02 Aug 2005 Posts: 75 Topics: 27
|
Posted: Fri Aug 05, 2005 8:10 am Post subject: |
|
|
kolusu,
i didn't say anything like this....
_________________ Regards,
batu |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Fri Aug 05, 2005 8:43 am Post subject: |
|
|
A simple case of mistaken identity!
Don't take it too hard.
Cheers,
Merv _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Aug 05, 2005 8:50 am Post subject: |
|
|
batu544,
My sincere apologies. sorry !
I edited the post to reflect the right person.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
schintala Beginner
Joined: 18 May 2005 Posts: 108 Topics: 31 Location: USA
|
Posted: Fri Aug 05, 2005 9:52 am Post subject: |
|
|
db2move is a data movement tool that can be used to move large numbers of tables between DB2 databases. This command works in DB2 for LUW applications. I don't think there is anything called DB2 MOVE in z/OS environment. |
|
Back to top |
|
|
batu544 Beginner
Joined: 02 Aug 2005 Posts: 75 Topics: 27
|
Posted: Fri Aug 05, 2005 10:50 am Post subject: |
|
|
ha..ha... u ppl also don't take it too hard.... _________________ Regards,
batu |
|
Back to top |
|
|
Manas Biswal Intermediate
Joined: 29 Nov 2002 Posts: 382 Topics: 27 Location: Chennai, India
|
Posted: Fri Aug 05, 2005 1:09 pm Post subject: |
|
|
schintala,
Can the db2move utility on UDB export and import selected columns? I thought that it could only move whole tables.
Of course, for DB2 on S/390, the only option is to drop and recreate the table.
Regards,
Manas _________________ There is no path to peace. Peace is the path.
- Mahatma Gandhi (1869-1948) |
|
Back to top |
|
|
schintala Beginner
Joined: 18 May 2005 Posts: 108 Topics: 31 Location: USA
|
Posted: Fri Aug 05, 2005 3:05 pm Post subject: |
|
|
Yes, you are right. DB2MOVE utility only to move the whole table. It can't used to move part of the table columns. |
|
Back to top |
|
|
|
|