Can I change the Column Name without losing data and change the sequence

Dear Experts,
I want to change the column name without changing the sequence and dont want lose the data.

Oracle Version : ?
Example Based on 10g.
SQL> conn scott/tiger
Connected.
SQL> create table col1 as select * from all_objects where rownum <= 100;
Table created.
SQL> alter table col1  add constraints col1_pk_objid primary key(object_id);
Table altered.
SQL> desc col1
Name                                      Null?    Type
OWNER                                              VARCHAR2(30)
OBJECT_NAME                                        VARCHAR2(30)
SUBOBJECT_NAME                                     VARCHAR2(30)
OBJECT_ID                                 NOT NULL NUMBER
DATA_OBJECT_ID                                     NUMBER
OBJECT_TYPE                                        VARCHAR2(19)
CREATED                                            DATE
LAST_DDL_TIME                                      DATE
TIMESTAMP                                          VARCHAR2(19)
STATUS                                             VARCHAR2(7)
TEMPORARY                                          VARCHAR2(1)
GENERATED                                          VARCHAR2(1)
SECONDARY                                          VARCHAR2(1)
SQL> alter table col1 rename column object_id to object_no;
Table altered.
SQL> desc col1;
Name                                      Null?    Type
OWNER                                              VARCHAR2(30)
OBJECT_NAME                                        VARCHAR2(30)
SUBOBJECT_NAME                                     VARCHAR2(30)
OBJECT_NO                                 NOT NULL NUMBER
DATA_OBJECT_ID                                     NUMBER
OBJECT_TYPE                                        VARCHAR2(19)
CREATED                                            DATE
LAST_DDL_TIME                                      DATE
TIMESTAMP                                          VARCHAR2(19)
STATUS                                             VARCHAR2(7)
TEMPORARY                                          VARCHAR2(1)
GENERATED                                          VARCHAR2(1)
SECONDARY                                          VARCHAR2(1)
SQL> column column_name format a30
  1  select column_name,constraint_name
  2  from user_cons_columns
  3  where table_name = 'COL1'
  4* and owner = 'SCOTT'
COLUMN_NAME                    CONSTRAINT_NAME
OBJECT_NO                      COL1_PK_OBJID
SQL>
also go through
http://www.dizwell.com/prod/node/65
Message was edited by:
user52

Similar Messages

  • How can I change my iCloud email without losing pictures and data

    HOw can I change me iCloud email without losing pictures and data

    If you sign out it will be removed from the phone (but not from the icloud account)
    What are you trying to achieve here, why change your email address?
    I just realised that I answered the wrong person.
    Jill, you should start your own thread.

  • Is there any way I can program "Capture" to save pnp.picts always under the same name, without a date ?

    Is there any way I can program "Capture" to save pnp.picts on the desk, but always under the same name, without a date ?
    It may be sound weird, but I use it in a very special way, and I would like, like photoshop, that capture just replace
    the previous pict by the new one..without any warning.
    Pierre

    There is no way to go back from an XFA form to an Acroform even with Acrobat Pro, still less with Acrobat. You either need to remake the form, or change your plans to use a third party viewer - Adobe have an excellent range of programs they would like you to use!

  • Can I log out of icloud without losing information and pictures?

    Can I log out of Icloud without losing pictures and info?

    Back them up, sign out, Restore them. They will be deleted (from your computer, but not from your iCloud account) when you sign out.

  • I have OS X 10.5.8.  Can I load Snow Leopard without losing data and then upgrade to Lion?

    I am using OS X 10.5.8.  I have a disk with Snow Leopard on it, but I don't know if I downloaded it.  Can I download this Snow Leopard disk without risking a loss of data on my MacBook Pro?

    If by "download" you mean "install," then you can install Snow Leopard over a Leopard system. But anything can happen, so it would be wise to backup first.
    1. Repair the Hard Drive and Permissions
    Boot from the Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    2. Install Snow Leopard
    If the drive is OK then quit DU and return to the installer.  Boot from the Snow Leopard installer DVD.  Follow the onscreen instructions. Note that the Snow Leopard installer will not erase your drive or disturb your files.  After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
    Download and install the Mac OS X 10.6.8 Update Combo v1.1.

  • How to switch apple id on ipad without losing data and info

    i gave my dad a ipad for christmas, i set it up under my account( the mistake) so how do i switch everything to his apple id without losing everything ie songs, movies, game stats?

    You can sign out and then into his Apple ID without losing data, but the iTunes Store content will remain associated with yours. Changing that requires deleting and redownloading it, which will erase application data when done on an iOS device.
    (121561)

  • How can I make a drive bootable without losing data on it?

    Is there a way to make a second internal drive bootable without losing the data that is already on it?
    The second drive was created under Panther 10.3.9. My main internal drive has had a clean install of Tiger 10.4.3. The second drive used to appear in the start up disk list when I was running 10.3.9 on the main drive. That is, it used to be bootable under 10.3.9. No kidding. After the main drive was given a clean install of Tiger, the second drive disappeared from the start up disk list. Please note: the second drive remains completely accessible when I am running off the main drive in 10.4.3. I can even use the few applications I had placed on the drive. It appears as separate drive under disk utility.
    I assume the second drive was installed as slave. (Both it and the main drive were independently bootable under 10.3.9.) It is not locked. "Ignore ownership" is not checked. The system has read-write privileges. Admin has read-write all others are read only. I am the only person who has access to this machine. It is not networked.
    I tried to ask this question a few days ago, but I think the way I phrased it confused the issue. My real question is NOT how did this get like this? It is can I make a drive bootable when it already has data on it?
    Thanks
    G4 Panther & Tiger   Mac OS X (10.4.3)  

    Hi,
    Thanks for your reply.
    You replied:
    the drive that you cannot
    boot from is a separate physical hard drive from the
    internal drive with 10.4.3. Is that correct?
    Yes.
    Have you used System Preferences > Startup Disk and
    looked to see if the 10.3.9 system shows up there?
    Yes, I have looked and it's not there.
    I got the impression that you have backed up the 10.3.9
    disk and that you do not really need the data there.
    Yes, I backed up a drive that was bootable, but then it lost its "bootabilty" and what I got was two non-bootable drives--the original second internal drive that I'm asking about and the back-up of it. I want the data on the drive and I wan the drive to be bootable.
    One thing that you might try when you are booted off
    your 10.4.3 system is to use Disk Utility, select the
    other disk and do a Repair Disk.
    Done that and it says there is no problem. Nada. Zero. It just won't boot, no more, no how, no way. BUT it remains fully accessible--I can access all my info. It's just become a storage drive that cannot be booted. Go figure.
    reformatting means
    destroying the data on the disk.
    Yup, which is why I asked my original question. Does anyone know if there is any way to make a drive bootable without destroying the data on it?
    I suspect the answer is no (given these particulars), but I thought some wise super-techie out there might have a trick up their sleeve.

  • HT1296 I bought a new computer and I want to sync my iPod Touch with the new computer without losing data.

    I bought a new computer and want to use the new computer to sync data with my iPod touch.  I understand that you can only sync a device with one computer at a time.  This if fine because I don't care to sync my iPod with the old computer anymore.  How do I set up my new computer to be the computer that syncs with my iPod touch from now on, without losing any data?

    You don't.
    When you sync to a different computer it erases the content from the ipod and replaces it with the data from the new computer.
    Just copy everything from your old computer, or your backup copy of your old computer, to your new one, then sync

  • How to repair the Time Capsule without losing data?

    Hi everyone,
    I am from Vietnam. My 2TB Time Capsule is not working anymore. The LED light is not lit. Brought it for warranty claim. Apple reseller in my country agree to replace a new one for me. But the problem is I will lose all the data. I believe it's HDD still good. But they can't help me to get data. Please advise where can repair the Time capsule in which they can retain the data for me.

    Before you do this be sure and let Apple know that is what you are doing so it will not void the warranty on your Time Capsule.
    That will void the warranty. Generally Apple will not allow you to recover data.
    The TC is basically a backup target for TM.. this is not considered valuable in and of itself. You simply buy the new TC and make a new clean backup.
    If you put data on the TC, it is without any means to backup itself and nor can TM backup data on network drives.. so you are stuck. And that is why we do not recommend TC usage as a NAS.
    See if the reseller is strict about the policy.. some will be prepared to help you out.
    The hard disk has to be removed from the TC.. which is a sealed unit. The hard disk can then be put in a USB holder and the material on the drive copied to the new TC, or any external or network drive.
    There is absolutely no way without removing the drive in a dead TC.

  • Can you turn off iCloud Drive without losing data?

    I enabled iCloud drive but then discovered through some articles that one should not enable iCloud Drive until Yosemite comes out and all of one's devices are running iOS8 and Yosemite on their computes.  Since enabling iCloud Drive I am missing Photostream and Pages docs that I had on my phone and god knows what else. When I went to try and turn off iCloud Drive (so I can then wait until Yosemite comes out before I re-enable iCloud Drive), I get the following message:
    "Are you sure you want to turn off iCloud Drive? Some changes have not been uploaded to iCloud. If you turn off iCloud Drive, these changes will be lost." Immediately below that message is a red message that says "Delete from iPhone."
    What exactly would be deleted from my phone if I turn off iCloud Drive?  What changes does the message refer to?  Why can't I just return my phone from iCloud Drive to the regular Cloud so I can access my Photostream and my Pages data?  And why on earth did Apple not alert us to the issues we would face with iOS8 if we install BEFORE Yosemite comes out?  This is so frustrating!
    Thanks in advance for any advice.
    Teresa

    I would love to hear that Apple has remedied this problem. From other discussion strings that I am following related to this issue, it seems thus far we remain out of luck. I did discover that if I log onto iCloud.com I can access my files that way.  Still, what a pain. 
    When I got the message re iCloud Drive as I was setting up my phone after the update to iOS8, it said I wouldn't be able to access my files unless all of my devices were running iOS8 OR Yosemite. That message was misleading as it really should have said all devices need to be running iOS8 AND your mac needs to be running Yosemite, as it was not an "either or" situation.  So frustrating...

  • Can I reformat an external hdd without losing data?

    I hava a Seagate goflex 500gb that is about half full with itunes and videos.  It is formatted as windows ntfs it does work on my macbook pro.  I would like to add Iphoto 11 and have the hdd refromatted mac os (journaled).  I do not have enough storage on my macbook to put the data before reformatting.  So can this be done or do I need another hdd?

    No you need another HD, If you format that HD for the mac all your data will be lost.
      a 1TB external now is running around $65
    Everyone should have 2 backups of their important stuff anyway, ....the motto is 2 backups is 1, and one is none. HD can and do fail. Important data that cant be replaced needs to be protected.

  • How to back up iphone6 ios8.1.3  to a new itunes library, new laptop without losing data and music? please help!

    I recently reformated my laptop , i wanted to know whats the easiest way to back up my iphone without losing anydata even if i sync my phone to my new itunes.

    Use your backup copy of your computer to put everything back onto your computer, then sync.

  • Can I uninstall & then reinstall ff without losing bookmarks and passwords? If so, how?

    I made the mistake of changing permissions within page info on my fantasy football site. Was trying to get rid of an advertisement that covered areas of the page and prevented me from setting my weekly starting lineup.
    Rather than doing that, it has made it impossible for me to log in to my team's web pages. I can log in to CBS Fantasy Football, but not to the pages that deal with my league or team.

    There is another way...but to answer your question, yes. When you uninstall FF it ask to delete 'personal' files or some such expression. I did it and did not lose any of my bookmarks or even many other special settings. Edit: if you don't get a window asking to save settings, wait for another to suggest help. I could be wrong. My setup was on vista and I see you are on XP.

  • Can you reinstall OS X Mavericks without losing data

    I think something happened to my operating system.  I had to reset all permissions using the disk utility and now somethings just don't work right.  For example:  I can open system preferences, and when I click on iCloud, it says "loading" and then hangs up.
    Can I reinstall Mavericks by downloading a copy from the app store and if so, will i lose any data?
    Thanks

    Hi RevRemM,
    I'm not sure this can help but is it possible that you went over the limit of the iCloud data usage? I'm a bit old school but if you reinstall the OS be sure to backup every thing just incase of a problem. I've done a clean install a month ago and everything went perfect even with all my password and setting, since all my document from none apple apps are well clasified elsewhere no issue here. All was sync on the iCloud, thing is if you're having problem with iCloud my guess is that you verify if your material is on the cloud looking at icloud.com. You'll have to redo all your setting but all your document will be intact.
    But yes you can reinstall over your actual system but a clean install is alway a bit cleaner.
    Hope it help...

  • Function module to get the month name when start date and end date given

    Hey Experts,
                       I am creating a employee bonus report. In this report each and every employee's month wise working days have to be calculated and displayed in the report. I need to find a function module which helps me split the given dates into that particular month. Please help me with the same.
    Regards,
    G. Shankar

    Hi Shankar,
    I think there are two Function Modules.
    First One is 'HR_RU_MONTH_NAME_IN_GENITIVE' in this u need to pass month number and for that u have extract month number from date.
    And Second One is 'ISP_GET_MONTH_NAME' in this u need to pass date or month number, it directly accepts date.
    Check this two and let me know.
    Cheers,
    Parth Parikh

Maybe you are looking for