How to disable the index to the rows of the table updated

Hello world

I have a problem on a table with Oracle11g.

I would update a table a lines opposite two in a table. This table has an index, and during the inversion, the index is duplicated.

So, I turn off the index and then rebuild all indexes like this: How to disable the index in oracle

However, I can't update a table when my index finger is rolled unusable.

I create my table:

CREATE  TABLE MY_TABLE(
  ID                         NUMBER(5) NOT NULL,
  TYPE                        NUMBER(1) NOT NULL,
  PRIO                       NUMBER(4) NOT NULL,
  CONSTRAINT PK_MY_TABLE
    PRIMARY KEY (ID, TYPE )
);

CREATE INDEX  PRIO_UK
    ON MY_TABLE(TYPE, PRIO);



Then I selected all the elements and the results is:

ID Type Prio
1110
2111

Then, I tried to update this list with this script:

UPDATE MY_TABLE set PRIO = 11 WHERE ID = 1 AND TYPE = 1;
UPDATE MY_TABLE set PRIO = 10 WHERE ID = 2 AND TYPE = 1;



I have an error on the first line, because the subscript for type 1 and 11 priority already exist.

You have another solution to solve my problem?

I thank you very much.

Do not disable your index. Just perform your update with a single blow. Like this

SQL> select *
  2    from my_table;

        ID       TYPE       PRIO
---------- ---------- ----------
         1          1         10
         2          1         11

SQL> update my_table
  2     set prio = case when id = 1 and type = 1 then 11
  3                     when id = 2 and type = 1 then 10
  4                end
  5   where (id = 1 and type = 1)
  6      or (id = 2 and type = 1);

2 rows updated.

SQL> select *
  2    from my_table;

        ID       TYPE       PRIO
---------- ---------- ----------
         1          1         11
         2          1         10

SQL>

Tags: Database

Similar Questions

  • How to disable the background update in the window 10?

    Anyone know how to disable the background update or surveillance? I already turn off the window updated administrative tools and all I know which include antivirus. However, my internet speed always very slow.

    My internet package comes with a slow speed and I couldn't go in the Web page when it has updated or programs using my internet connection in the background. Can I only surf the internet when there is no update in behind.

    I would be grateful if anyone of you could let me know how to solve this problem. Thank you

    Coolcola, welcome to the forum.

    Here's a guide that should help you solve your problem.

    Please click on the button + Thumbs up if I helped you and click on accept as Solution If your problem is resolved.

  • How to disable the automatic updates of windows and to update on demand

    At the same time, I had disabled the automatic updates of windows and updated on demand by opening windows update.  Where is the place to activate and deactivate the automatic updates of windows.

    It worked.  Thank you!

    I wasn't able to get automatic updates to download a microsoft windows update.  The fix for microsoft in default mode indicated that he needed to be repaired and that fixed it.  When windows update was used again the update has failed once again.  The fix even that it was then run in aggressive mode and with a recheck has failed to correct the problem.  At each restart, automatic updates took the time to start producing a yellow shield and then pop-up reminders.  So thank you to help us with these questions to disable the automatic updates of windows.

    Thanks for posting the results of your efforts, I don't know they will be read and appreciated.

    UTC/GMT is 15:27 on Thursday, October 6, 2011

  • How to disable the Windows Update for bluetooth device?

    I have a controller that must be installed whenever I use, and it always looking on windows update that take a long time to complete (there is no update for it anyway). I know I can jump to update manually whenever I install it, but it is very annoying. Is there a way to disable the update of windows for all bluetooth devices?

    Hello

    You will not be able to disable the automatic update to a specific device. I suggest you to refer to the article and see if it helps:

    Activate the update or disable automatic

    http://Windows.Microsoft.com/en-us/Windows7/turn-automatic-updating-on-or-off

    Understand the automatic Windows Update

    http://Windows.Microsoft.com/en-us/Windows7/Understanding-Windows-automatic-updating

  • How to disable the automatic updates?

    Hi all

    I would like to disable the automatic updates and be able to manually check for updates without it becomes a task complicated.

    The only answer I could find so far is the following: https://helpx.adobe.com/creative-suite/kb/disable-auto-updates-application-manager.html

    Is this the only solution? Because, in reading the notes, also seem to which would prevent me from easily control updates. Have I misunderstood?

    I absolutely need to do because when I'm at work, in my office, I have absolutely no problem connecting.

    But coming to the House, in a very rural village with a... Let's say "connecting powered-pigeons", automatic updates can become a serious problem for me.

    Thank you in advance!

    Carlo

    Acrobat has its own settings to update.  Open your preferences and disable the auto update.  I'm no expert, but Acrobat seems to be a strange duck in the world of CC.  Although it is part of the CC, it still seems to work more as a stand-alone product.

  • How to disable the automatic updates?  I tried asking chat support and I was told that it was impossible.  I need to disable the updates because my school disables updates on the first day of class, and if my updates at home I will not be able to work bet

    I tried asking chat support and I was told that it was impossible.  I need to disable the updates because my school disables updates on the first day of class, and if my updates at home I will be not able to do work between school and home

    You can install older versions if you use an older version.  but the newer versions (for example, cc 2015) can always post files to open in cc.

    If you want to save a file for cs6 install cs6 at home.

  • How to disable the automatic updates of Windows

    F * windows update restarted my computer so THAT I WAS GAME LEFT 4 DEAD 2! WTH! How I (deleted): turn off windows updates STUPID 5 second caveat permanently!

    * original title - who was the GENIUS who made windows update restart your computer in 2 minutes WITHOUT TELLING YOU? because I want to strangle besoin.*

    http://support.Microsoft.com/kb/555375 >

    It helps those answering questions if you provide:

    what the version of windows (32-bit or 64-bit) and service pack level.

    http://blogs.msdn.com/tim_rains/Archive/2004/11/15/257877.aspx>

    http://social.answers.Microsoft.com/forums/en-us/vistawu/thread/c584900a-BDDC-4E30-B159-0e49cb231c0f>

  • How to disable the prompt Update Service

    Hello

    I'm deployment NOR 488.2 on several remote systems using silent installation.  Installation works well, except that a Service update OR prompt appears after reboot.  I can't turn off the prompt by unchecking the checkbox 'periodic control... '. "in the settings of the Update Service of NOR.  However, I want to be able to 'disable' this box during or immediately after the installation.  Is there a file of configuration or guest registry entry that I can use to turn off remote update service?  Thank you very much for your help!

    -Eric

    Add this option to your call of setup.exe: /disableNotificationCheck

    Then Update Service should not start after reboot. You can always activate the periodic verification later in the preferences.

  • How to disable the automatic updates of programs not in my computer?

    For several weeks, automatic updates has tried to install an a security update for PowerPoint 2007, which is no longer on my computer. I upgraded to MS Office 2010, so the update fails several times and keep trying. How do I turn it off?

    Try to run 'Fix' them in this article to remove all traces of Office 2007 http://support.microsoft.com/kb/971179

  • How to disable the optional updates

    Is there a way to disable "optional" updates (additional language packs) I don't want to install and do not want to keep appears there?

    You can hide updates you do not want to install.

    HOW to hide an update or restore a hidden update
    http://www.SevenForums.com/tutorials/24376-Windows-Update-hide-restore-hidden-updates.html

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • How to disable the laptop computer touchpad

    original title: how to disable the touchpad labtop

    I had a dell insipron labtop but I never use the touchpad, I find very annoying because he clicks all the time when I try to move, and it moves to the cursof if I touch it by accident when I try to type.  I never even use it because I make a mouse with me everywhere where I bring my labtop.

    How can I disable the touchpad?  I want no more uninstall it from my computer I just want to know how to turn off up to this I need to use it

    Click Start

    Select control panel
    Select the material and audio
    Select mouse
    Click to change the touchpad settings.
    This requires that you have installed the driver for the dell touchpad
    Dell support
  • I use a mouse in my Windows 7 laptop. How to disable the touchpad pointing device?

    I always use my mouse to my Windows 7 laptop.  I don't want the touchpad pointing device as my fingers touch when writing and everything spoil.  How to disable the touchpad pointing device? Thank you

    What is the brand and model of your laptop? What version of Windows 7?

    Many laptops have a key that will enable/disable the touchpad - mine is on the top row of keys where the function keys.

    You could also open mouse in Control Panel and look for an option here.

    I hope this helps.

  • How to disable the SOS on Apple Watch 2 function

    How to disable the SOS on Apple Watch 2 function?

    Hello

    It is not currently possible to completely disable the SOS emergency feature.

    However, to disable "hold to call auto":

    • On your iPhone, in the application of the watch, go to: Watch My > General > emergency SOS - deactivate Hold to call self.
  • How to disable the feature CALL SOS?

    I've just updated to iOS 10 and 3 watch OS, but I can't find how to disable the feature of emergency SOS on my Apple Watch.

    I thought it would be a good feature for me so I turned it on, but my fingers are clumsy, so I struck the wrong cursor when I turned off my watch and accidentally, I called 911. I've disabled "Stick to Auto Call" and deleted all my contacts SOS in general in the application to watch on my iPhone and I restarted the iPhone and the Apple Watch, but emergency SOS still shows on my watch when I want to turn off my watch.

    I think that before I turned emergency SOS, I saw "Power Reserve" under the "Power Off". I read that once you turn Hold for Auto call in the app shows and then turn off, the cursor of SOS emergency will always be displayed when you turn off the watch.

    How can I disable the cursor of emergency SOS when I turn off my Apple Watch? Can I use Reset under general, or désapparier my watch and pair again? I don't want to do that, because it would take a lot of time to get all my settings that I want them to be.

    Hello

    I'm not aware of any option settings to remove the emergency SOS cursor in the menu that appears on pressing them and holding the button.

    If you want Apple to consider adding an option to disable the feature, you can submit a request here:

    https://www.Apple.com/feedback/watch.html

  • How to disable the photo?

    How to disable the photo?

    Not easy - just ignore it

    LN

Maybe you are looking for

  • Extension automatically opens new tab

    I have a linux version of firefox. When I open a second window for the first time in a session, one of my extensions to open a tab with a new tab. Is there a way to prevent this. I checked the new tab setting and about: config and found nothing. I al

  • Can't see the new external hard drive connected to my iMac for my MacBook?

    Hi all I connected a new 8 TB external Seagate HD to my iMac and I try to see it from my MacBook Air and MacBook to my partner. It is properly formatted (journaled MacOS and GUID) and have not had any problems with the 3 TB drive, that we were connec

  • Mysterious owner PC connected to my Mac?

    I have a Macbook pro, Iris 1536 MB Intel 8 GB 1600 MHz DDR3 2.6 GHz Intel Core i5 This owner-pc is connected to me time-to-time. Sometimes, I just check my finder and its there. Sometimes it is not. If someone is logged on to my computer? Recently my

  • HP Mini 110-1169TU: fatal error... System stopped. CNU9476VP2

    Pls Help! My screen appears as follows. Enter the password for the CUURENT Password check failed Fatal error... System stopped CNU9476VP2

  • Tab order of window CVI

    Is it possible to maintain the order of the tabs in windows CVI? Suppose that my project is composed of three code files, a file of the UIR, source and two include files. All are loaded in the editor so that I can easily switch between them by clicki