Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

DROP TABLE

Posted on 2006-07-21
5
Medium Priority
?
859 Views
Last Modified: 2011-10-03
I HAVE A TABLE AND SOME MQT'S ARE RELATED TO THT TABLE
I WANT TO DROP THE TABLE AND RECREATE THE SAME TABLE ALL SAME COLUMNS
SAME DATATYPE BUT DONT WANNA DROP MQT ASSOCIATED TO IT
CAN I DO IT ?
THANKS
bobby
0
Comment
Question by:bobby2929
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 7

Expert Comment

by:sachinwadhwa
ID: 17155532
no, you have to recreate MQTs. If you drop table, your MQTs will be marked invaild.

use db2look command to extract DDL of MQTs before dropping tables.
0
 
LVL 2

Expert Comment

by:srielau
ID: 17170052
You can ALTER teh MQT to DROP the query. Thus you have them decoupled.
Later on you can ALTER ADD the query back in.

Cheers
Serge
0
 
LVL 50

Expert Comment

by:Lowfatspread
ID: 17181883
why drop the table...?

can you not just "truncate" it  with a Load Null or alter table ... activate not logged initially .. the with empty(?) option


sorry haven't got the exaft syntax to hand...

which version and platform of db2/udb are you using?
0
 

Author Comment

by:bobby2929
ID: 17185153
i am on version 8.2 platform NT
can we truncate table i thought truncate is not supported in db2  , i cant delete tht table
as it has like 17 mill rows , if sumone can post truncate command it will be great
thanks
bobby


0
 
LVL 2

Accepted Solution

by:
srielau earned 200 total points
ID: 17185297
ALTER TABLE T ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE;
COMMIT;
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question