Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2009
    Posts
    4

    Unanswered: DROP SCHEMA in Informix

    Hello,

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

    ?

  2. #2
    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 ?'
    ;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •