i want to rename the table schema

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gaozj111@yahoo.com.cn

    i want to rename the table schema

    Hello:

    Now i want to rename the table schema

    for example:

    there is one table ,whose name is A.TEST,the A is the schema name,
    now i want to rename the A TO B.
    I want to get the B.TEST table.

    What i should do .
    Pls help me.
    Thanks with best regards.
    Jones

  • Phil Sherman

    #2
    Re: i want to rename the table schema

    As far as I know, you can't change the schema name. RENAME will change
    the table name. There are two possibilities:

    1. CREATE TABLE B.TEST LIKE A.TEST
    INSERT INTO B.TEST SELECT * FROM A.TEST
    DROP TABLE A.TEST

    2. CREATE ALIAS B.TEST FOR A.TEST

    The second makes it appear theat B.TEST is the table without changing
    the underlying object.

    Phil Sherman

    gaozj111@yahoo. com.cn wrote:[color=blue]
    > Hello:
    >
    > Now i want to rename the table schema
    >
    > for example:
    >
    > there is one table ,whose name is A.TEST,the A is the schema name,
    > now i want to rename the A TO B.
    > I want to get the B.TEST table.
    >
    > What i should do .
    > Pls help me.
    > Thanks with best regards.
    > Jones
    >[/color]

    Comment

    Working...