Rename the table !!

User is asking to rename the table !
Is there any syntax out there to rename the table without
dropping and recrreating whole table.
From
P

SQL> desc t
Name                          Null?    Type
ID                                     NUMBER
AMT                                    NUMBER
SQL> desc t1
ERROR:
ORA-04043: object t1 does not exist
SQL> RENAME t to t1;
Table renamed.
SQL> desc t1;
Name                          Null?    Type
ID                                     NUMBER
AMT                                    NUMBERTTFN
John

Similar Messages

  • I have duplicated a sheet and need to rename the tables in the duplicate.  Can anyone help me?

    I have duplicated a sheet in Numbers and need to rename the tables in the duplicate sheet to avoid circular references.  Can anyone help me?

    Hi Pacarina,
    I'm not sure if this is your question (I'm puzzled by your mention of circular references) but this is how you change a table name in Numbers 3. Select the table (click on it), then make sure Table Name is checked in the Table tab of the format panel, then edit the name directly where it appears above the table.
    SG

  • How do I rename the table using Impdp?

    Using the Impdp/Expdp utility of Oracle, I am trying to import a table. However the target database contains a table with the same name. How do I rename the table using Import?
    REgards,
    Sakthi

    SAKTHIVEL wrote:
    Using the Impdp/Expdp utility of Oracle, I am trying to import a table. However the target database contains a table with the same name. How do I rename the table using Import?
    Hmm well why you just can't rename the table on the target db with the rename table to command and then do the import, will be easy right?
    Aman....

  • Error in renaming the table from SYS user

    Hi
    I am in Schema by name jc
    and I have a table by name tab1
    now i logged as sys user
    then I give a command
    rename jc.tab1 to tab2 ;
    getting the following error
    rename jc.tab1 to tab2
    ERROR at line 1:
    ORA-01765: specifying table's owner name is not allowed
    Query is
    Is it notpossible to rename a table of other schema by logging as sys user ?
    is there any other alternate method of doing so??
    Thanks and Regards
    JC

    Sorry Guido,
    I have not stolen anything from anywhere :)
    All are mine ...I have created some normal users and some users with DBA privileges....
    I use this schemas for testing purpose....
    Also if I give command like from SYS user
    Alter table jc.tab1 rename to tab2 ;
    It will create tab2 in jc schema only and not in SYS schema.
    So there is no question of poluting the SYS schema.
    Also whatever I ask in this forum is a part of my application related,
    I never give the entire program, which may be useless for others and time taking in understanding.
    I just simulate whatever I require in as simplae format as I can
    The person who is very perfect in this forumn can find such queries rubbish. But in learning process no question is rubbish, but there can be a rubbish answer to every intelligent question too... :)
    Regards
    JC

  • How can I rename the PATH_TABLE table of an index for an XMLType column?

    I have a table having a column of type XMLType. Thus, I had created an XMLIndex with an according <tablename>PATHTABLE table.
    Now I want to rename the table as well as the associated <tablename>PATHTABLE table.
    How can I achieve this? Do I have to rename the XMLIndex as well?
    Thank you.

    "ALTER INDEX " + idxName + " PARAMETERS('PATH TABLE " + newTblName + "')";does the trick but I can't achieve renaming the index with
    ALTER INDEX " + oldIdxName + " RENAME TO '" + newIdxName + "'";
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Unable to load the tables in the Power Pivot Window – An Item with the Same Key has already been added

    Hi there,
    I recently had the following situation, where I changed the source of my CSV file in Power Query.
    Once I had reloaded the file, it would then not load into Power Pivot. So I disabled the loading from Power Query into Power Pivot. I then enabled the loading to the Data Model. Which then successfully loaded the data into Power Pivot.
    But once I went into Power Pivot, had a look, then saved the Excel file. Once saved I closed the Excel file. I then opened the Excel file again and all the sheets that interact with the Power Pivot data work fine.
    But if I go and open Power Pivot I get the following error: Unable to load the tables in the Power Pivot Window – An Item with the Same Key has already been added.
    This is what I get from the Call Stack
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
       at Microsoft.AnalysisServices.Common.LinguisticModeling.SynonymModel.AddSynonymCollection(DataModelingColumn column, SynonymCollection synonyms)
       at Microsoft.AnalysisServices.Common.LinguisticModeling.LinguisticSchemaLoader.DeserializeSynonymModelFromSchema()
       at Microsoft.AnalysisServices.Common.SandboxEditor.LoadLinguisticDesignerState()
       at Microsoft.AnalysisServices.Common.SandboxEditor.set_Sandbox(DataModelingSandbox value)
       at Microsoft.AnalysisServices.XLHost.Modeler.ClientWindow.RefreshClientWindow(String tableName)
    I would assume that the issue is with the synonyms and for some reason, when I disabled the loading of my data into the Power Pivot Model, it did not remove the associations to the actual table and synonyms.
    If I renamed the table in Power Pivot it all works fine. So that was my work around. Fortunately I did have a copy of the Excel workbook before I made this change. So I could then go and add back in all the relevant data to my table.
    Has anyone had this before and know how to fix it?
    http://www.bidn.com/blogs/guavaq

    Hi there
    I can share the work book, if possible to send me an email address. As the workbook size is about 9Mb.
    Thanks
    Gilbert
    http://www.bidn.com/blogs/guavaq

  • Creating a Mat View having the same name with that of the table name

    Hi everyone,
    After dropping the mat view name "QQ.TRDLN_DIM_MV", I'm trying to re-create it by having the same name as that of the table but I got an error stating that "name is already used by an existing object". How can create a mat view to look like the object owned by schema "GQ", having a name that is the same as that of the table name, without dropping the table?
    OWNER_O OBJECT_TYPE CREATED LAST_DDL_ TIMESTAMP STATUS OBJECT_NAME
    ===
    GQ MATERIALIZED VIEW 05-NOV-08 13-DEC-08 2008-11-05:06:31:46 VALID TRDLN_DIM_MV
    GQ TABLE 05-NOV-08 15-DEC-08 2008-11-05:06:31:00 VALID TRDLN_DIM_MV
    QQ TABLE 17-AUG-07 16-MAR-09 2007-08-17:17:05:21 VALID TRDLN_DIM_MV
    SQL&gt;CREATE MATERIALIZED VIEW QQ.TRDLN_DIM_MV
    2 TABLESPACE FPLC01S
    3 NOCACHE
    4 NOLOGGING
    5 COMPRESS
    6 PARALLEL ( DEGREE 2 INSTANCES 1 )
    7 BUILD IMMEDIATE
    8 REFRESH FORCE ON DEMAND
    9 WITH PRIMARY KEY
    10 AS
    11 select /*+ NO_REWRITE */ trdln_id,
    12 trdln_skid,
    13 trdln_end_date,
    14 first_value(trdln_end_date) over (partition by trdln_id order by trdln_end_date DESC) as MaxDate
    15 from QQ.trdln_dim;
    from QQ.trdln_dim
    ERROR at line 15:
    ORA-00955: name is already used by an existing object
    I appreciate your help. Many thanks in advance!
    Regards,
    Radic

    You'd have to rename the table (using ALTER TABLE tablename RENAME TO othername; ) before you create the MV.
    You can't have both existing with the same name in the same schema.
    What you see in the GQ schema is that the "table" is the underlying table for the Materialized View.
    When you do a CREATE MATERIALIZED VIEW MY_MV AS ...
    Oracle creates two objects with the same name, one being the Materialized View MY_MV and the other being the table MY_MV which is the physical storage. {Remember that a Materialized View is a means of getting a physical representation of a View}.
    In the QQ schema what you have is either
    a. a real Table
    or
    b. an improperly dropped MV, resulting in the underlying Table still present.

  • Unable to descripe the table and unable to drop the table

    Hi,
    I have a temp table that we use like staging table to import the data in to the main table through some scheduled procedures.And that will dropped every day and will be created through the script.
    Some how while I am trying to drop the table manually got hanged, There after I could not find that table in dba_objects, dba_tables or any where.
    But Now I am unable to create that table manually(Keep on running the create command with out giving any error), Even I am not getting any error (keep on running )if I give drop/desc of table.
    Can you please any one help on this ? Is it some where got stored the table in DB or do we any option to repair the table ?
    SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects where OBJECT_NAME like 'TEMP%';
    no rows selected
    SQL> desc temp
    Thank in advance.

    Hi,
    if this table drops then it moved DBA_RECYCLEBIN table. and also original name of its changed automatically by oracle.
    For example :
    SQL> create table tst (col varchar2(10), row_chng_dt date);
    Table created.
    SQL> insert into tst values ('Version1', sysdate);
    1 row created.
    SQL> select * from tst ;
    COL        ROW_CHNG
    Version1   16:10:03
    If the RECYCLEBIN initialization parameter is set to ON (the default in 10g), then dropping this table will place it in the recyclebin:
    SQL> drop table tst;
    Table dropped.
    SQL> select object_name, original_name, type, can_undrop as "UND", can_purge as "PUR", droptime
      2  from recyclebin
    SQL> /
    OBJECT_NAME                    ORIGINAL_NAME TYPE  UND PUR DROPTIME
    BIN$HGnc55/7rRPgQPeM/qQoRw==$0 TST           TABLE YES YES 2013-10-08:16:10:12
    All that happened to the table when we dropped it was that it got renamed. The table data is still there and can be queried just like a normal table:
    SQL> alter session set nls_date_format='HH24:MI:SS' ;
    Session altered.
    SQL> select * from "BIN$HGnc55/7rRPgQPeM/qQoRw==$0" ;
    COL        ROW_CHNG
    Version1   16:10:03
    Since the table data is still there, it's very easy to "undrop" the table. This operation is known as a "flashback drop". The command is FLASHBACK TABLE... TO BEFORE DROP, and it simply renames the BIN$... table to its original name:
    SQL> flashback table tst to before drop;
    Flashback complete.
    SQL> select * from tst ;
    COL        ROW_CHNG
    Version1   16:10:03
    SQL> select * from recyclebin ;
    no rows selected
    It's important to know that after you've dropped a table, it has only been renamed; the table segments are still sitting there in your tablespace, unchanged, taking up space. This space still counts against your user tablespace quotas, as well as filling up the tablespace. It will not be reclaimed until you get the table out of the recyclebin. You can remove an object from the recyclebin by restoring it, or by purging it from the recyclebin.
    SQL> select object_name, original_name, type, can_undrop as "UND", can_purge as "PUR", droptime
      2  from recyclebin
    SQL> /
    OBJECT_NAME                    ORIGINAL_NAME TYPE                      UND PUR DROPTIME
    BIN$HGnc55/7rRPgQPeM/qQoRw==$0 TST           TABLE                     YES YES 2006-09-01:16:10:12
    SQL> purge table "BIN$HGnc55/7rRPgQPeM/qQoRw==$0" ;
    Table purged.
    SQL> select * from recyclebin ;
    no rows selected
    Thank you
    And check this link:
    http://www.orafaq.com/node/968
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables011.htm
    Thank you

  • Problem while renaming a table

    Hi,
    I am running oracle 10.2.0.4.0 on AIX 5.3.
    While i issue a table rename statement it just hangs.
    the table contains 1500 million rows.
    Please suggest what should i check before running a table rename statement.

    select * from dba_dml_locks is giving following output
    SESSION_ID     OWNER     NAME     MODE_HELD     MODE_REQUESTED     LAST_CONVERT     BLOCKING_OTHERS
    532     TBAADM     CUM_TRAN_DETAIL_TABLE     Exclusive     None     26888     Not Blocking
    533     SYS     WRH$_SQL_BIND_METADATA     Row-X (SX)     None     21701     Not Blocking
    533     SYS     WRH$_SQL_PLAN     Row-X (SX)     None     21701     Not Blocking
    i am renaming cum_tran_detail_table to hist_tran_detail_table
    select * from dba_ddl_locks where owner = 'TBAADM'
    SESSION_ID     OWNER     NAME     TYPE     MODE_HELD     MODE_REQUESTED
    534     TBAADM     CUM_TRAN_DETAIL_TABLE     Table/Procedure/Type     None     Exclusive
    528     TBAADM     CUM_TRAN_DETAIL_TABLE     Table/Procedure/Type     None     Share
    527     TBAADM     CUM_TRAN_DETAIL_TABLE     Table/Procedure/Type     None     Exclusive
    532     TBAADM     TBAADM     18     Null     None
    534     TBAADM     TBAADM     18     Null     None
    527     TBAADM     TBAADM     18     Null     None
    525     TBAADM     TBAADM     18     Null     None
    532     TBAADM     NABIL_CTD_SHORTFALL_TRIG     Trigger     Exclusive     None
    532     TBAADM     HIST_TRAN_DTL_TABLE     Table/Procedure/Type     Exclusive     None
    should i disable/drop any trigger before trying to rename the table? and then again enable/recreate the same after renaming?

  • Rename of table column messed up field in Edit Screen

    I renamed a table column. I have a report page with an edit form page tied to it based on this table. I changed the SQL statement in the Region Source on the report. The appropriate column value is displayed in the report. I changed the Page Item name on the Edit Form page. I changed the Source Value to match the new field name.
    The problem I am running into is when I run the Edit Form page and change the value in the item of the renamed column, the field in the database table is blanked out. Even if I change the value to be the same value, the column is blanked out.
    What did I miss in renaming the table column?

    I've had a similar problem. I added a couple of new columns to a table and attempted to manually add the fields to an existing form. However, as described above, whatever value was entered on the screen, a NULL was stored on the database.
    I created a new form using the Form Wizard and copied the columns between pages and got them working. In the process, I tracked the problem down to the variable name.
    For example: for the column PRC_SCHEDULABLE, a item named P5_SCHEDULABLE works but any other item name produces the NULL problem.

  • Can I change the table name in a mapping without redoing  the connections?

    Hi All,
    I have a mapping that connects table A to table B_old. Is there a way change table "B_old" to "B_new" without altering any of the connections? (in other words, I just want to swap out the table)
    Thanks
    irene

    You can rename the table within the mapping and then synchronize it with the new table, using the option "match by names". The fields must have the same names as the new table fields. New fields will be created in the table.

  • Rename a table

    I am using Crystal XI.  The database table has been renamed and I need to rename the table in several reports.  I used to be able to use SetLocation and point the new one to the old one and press update... but that does not appear to work.
    What is the easiest way handle renaming a table?   If I drop and re-add it, it messes up all my groups and fields that I have placed in the report
    Thanks,
    Jeff

    Hello Jeff,
    I recommend to post this query to the [Crystal Reports Design|SAP Crystal Reports; forum.
    This forum is dedicated to topics related to the creation and design of Crystal Report documents. This includes topics such as database connectivity, parameters and parameter prompting, report formulas, record selection formulas, charting, sorting, grouping, totaling, printing, and exporting but also installation and registering.
    It is monitored by qualified technicians and you will get a faster response there.
    Also, all Crystal Reports Design queries remain in one place and thus can be easily searched in one place.
    Best regards,
    Falk

  • How do I change the tables

    I have an application finished and now the ADMIN says I have to rename all the tables.
    Do I have to redo the whole application??

    Hi,
    I've only ever renamed a few items and found it easiest to do an application export and then go through the sql file to identify the page(s) that the items were on, then go into each page and edit the appropriate objects. It could be that you could actually update the export file itself and then re-import it. You'd have to be careful to ensure that you only replace table names and allow for the fact that the export file may contain table names split over two lines - you'd then want to import into a new application id (just in case!)
    Another suggestion, perhaps, would be to rename the tables and then create synonyms using the original names?
    Andy

  • Rename the tablename within a procedure!

    I want to rename a table name within a procedure.
    and the rename shud be like :
    lf my table is "ABC",then the table name shud be "ABC_20061205" means "tablename_sysdate".
    there is also a system procedure called sp_rename it rename the table name ,also i could not work with this,can any body help me?

    An example. Replace the OLD_TABLE_NAME with the table name which you want to rename. This may be part of your procedure input parameter also.
    BEGIN
    EXECUTE IMMEDIATE 'ALTER TABLE OLD_TABLE_NAME RENAME TO ' || 'OLD_TABLE_NAME'||'_'||TO_CHAR(SYSDATE,'YYYYMMDD');
    END;
    Why would you want to rename the table inside the procedure? I would say this is a wrong approach if you hard code the table names inside the stored proc. There might be some other reason you would want to do this. Just curious to know.
    Regards,
    Mohana

  • Rename Collection Tables????????

    Hi all,
    I have tried to using xdb_utilities.renameCollectionTable to rename the tables created through a registration schema where maintainOrder is true in some collection elements.
    Is it possible???? I wanted to rebuild the index from this tables???.
    I maked correctly with maintainOrder = false, but I think, in this moment the tables were NESTED TABLES and now not.
    Any idea????
    Thanks in advance,
    David.

    Hi mgralike,
    apologize for me short answer.
    The ORSWE is the user utilized to create all infrastructure and to register the schemas aldo. At this moment he have been granted with all permisions, all roles (DBA, XDBADMIN, XDBWEBSERVICES and so on) and all systems privelegess to avoid problems with others Oracle functionalities.
    I have just registered other schemas with the same form and I could change the tables with yours package XDB_Utilities form the Oracle XML Basic Demo.
    In the new schema 'PlantillaProyecto, XSD' I only have changed two attributes in order to achieve a xml ordered. maintnainDOM and maintnainOrder, and in some cases only maintnainOrder has been declared. Now, I can not see tables in ALL_NESTED_TABLES.
    The first schema has not declared any previous attributes and I could change the tables names but the xml downloaded from the repository it is not ordered.
    I think, it is a problem with my use of attributes.
    I executed the following code describe PLANTILLAPROYECTO with the result:
    Nombre ┐Nulo? Tipo
    TABLE of SYS.XMLTYPE(XMLSchema "http://www.orswegimoarmada.es/ORSWE/XSD/Plantill
    aProyecto/PlantillaProyecto.xsd" Element "PlantillaProyecto") STORAGE Object-rel
    ational TYPE "PlantillaProyecto955_T"
    Thanks,
    David.

Maybe you are looking for

  • Sony 46 inch t Bravia 1920 X 1080 1080P

    I am trying to find the settings for 1920 X 1080. I was told that it exists. I have gone to system settings for displays and the desired resolution is not there.

  • HT4095 apple TV purchases

    I bought a movie using my Apple TV, now I cannot find the movie anywhere ... so I cannot download it neither to my iPad3 nor my computer. The movie does not appear even in the Apple TV where I complete the purchase, I have the proof of payment, but I

  • Credentials not saving

    Hello, Been working with a couple computers that are having this problem. I have done some searching on this as well. The users open IE10 to log into the share point site and of course it asks for the credentials. They save just fine in that window w

  • Software inventory reports being discarded

    The software inventory reports are being discarded for our MP's, and I'm trying to determine why, so at the very least we can verify it's a non-issue. Attached is a copy of one of the discarded XML files. If anyone can take a look at it, or let me kn

  • Mail 3.4 on 10.5.4 crashing on startup

    For the last several days, Mail has been continually crashing on startup. It will begin to check my mail, and sometimes even receive a message or two, and then crash. This has just started within the last 3 days, with no prior errors encountered. Her