Solved

DROP TABLE

Posted on 2006-07-21
5
827 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
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 50 total points
ID: 17185297
ALTER TABLE T ACTIVATE NOT LOGGED INITIALLY WITH EMPTY TABLE;
COMMIT;
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now