If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 equivalent for mysql's DROP TABLE IF EXISTS

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-06, 02:20
onemanifest onemanifest is offline
Registered User
 
Join Date: Jun 2006
Posts: 11
Question DB2 equivalent for mysql's DROP TABLE IF EXISTS

Hi,


I'd wonder if there's a way to do something like mysql's
Code:
DROP TABLE IF EXISTS <tablename>
in DB2?

Peter
Reply With Quote
  #2 (permalink)  
Old 09-28-06, 02:29
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
hi Peter

Use the db2perf_quiet_drop procedure. The source code is available on
ftp://ftp.software.ibm.com/ps/produc...perf-1.0.1.zip
In the file db2perf_utils.db2 there is the procedure db2perf_quiet_drop
which suppresses the 'not found' message.
The call :
CALL db2perf_quiet_drop( 'procedure db2perf_crmsg' )@
drops the procedure db2perf_crmsg if this procedure exists

regards,
Rahul Singh
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On