Unix Technical Forum

'commit' not having immediate effect

This is a discussion on 'commit' not having immediate effect within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Table t1 (f1, f2). Primary key (f1, f2) Contents : ('1', 'one') and ('2' , 'two') Table t2. Same ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 10:08 AM
dn.usenet
 
Posts: n/a
Default 'commit' not having immediate effect


Table t1 (f1, f2). Primary key (f1, f2) Contents : ('1', 'one') and
('2' , 'two')
Table t2. Same as t1. Same key, same data.

I ran : select t1.f1 from t1 t1, t2 t2
where exists (
select 1 from dual where t1.f1 = t2.f1
)
I used 'dual' because 'null' did not work in its place; I was just
trying out things.
This TOAD query/window hanged.

I opened another window, and ran :
update t1 set f1 = 'new' ;
commit ;
insert into t1 select * from t2 ;

I get the error : Primary Key Constraint Violation.
I suspect that that hanged query has something to do with this problem.

Please advise. TIA.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 10:08 AM
dn.usenet
 
Posts: n/a
Default Re: 'commit' not having immediate effect


dn.usenet wrote:
> Table t1 (f1, f2). Primary key (f1, f2) Contents : ('1', 'one') and
> ('2' , 'two')
> Table t2. Same as t1. Same key, same data.
>
> I ran : select t1.f1 from t1 t1, t2 t2
> where exists (
> select 1 from dual where t1.f1 = t2.f1
> )
> I used 'dual' because 'null' did not work in its place; I was just
> trying out things.
> This TOAD query/window hanged.
>


By the way, I know what command to use to see rows with t1.f1 = t2.f1
without using 'where exists' or 'dual'. I was just trying out those
things
out of curiosity.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 10:08 AM
Mark D Powell
 
Posts: n/a
Default Re: 'commit' not having immediate effect

You have a duplicate key error because you are trying to insert a
duplicate key. This has nothing to do the hung query. A duplicate is
a duplicate.

HTH -- Mark D Powell --

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:42 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com