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 > Informix > DROP SCHEMA in Informix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-09, 15:51
nimit77 nimit77 is offline
Registered User
 
Join Date: Jun 2009
Posts: 4
DROP SCHEMA in Informix

Hello,

Is there an equivalent of following command (in Informix):
DROP SCHEMA schema_name CASCADE ;

?
Reply With Quote
  #2 (permalink)  
Old 07-01-09, 17:23
bigcalm bigcalm is offline
Registered User
 
Join Date: Jul 2009
Posts: 37
Not really, "schemas" as such don't really exist in informix in that way - the closest thing to schemas is the owner of the tables/synonyms/functions/etc - and a lot of abstraction tools (Java in particular) regard ownership as schema.

You could get a list of table names/schemas and suchlike out of systables, eg...

select tabname
from systables
where owner = ?
and tabtype = "T"
and tabid > 99
-- Use each result to create a 'drop table ?'
;
select tabname
from systables
where owner = ?
and tabtype = "S"
and tabid > 99
-- use each result to create a 'drop synonym ?'
;
select tabname
from systables
where owner = ?
and tabtype = "V"
and tabid > 99
-- use each result to create a 'drop view ?'
;
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