Solved

DROP TABLE

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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

751 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