Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: DML on dual?
John,
Since I didn't have Tom's book with me, I decided to check his website. Probably had my facts confused. Right author, wrong example? Anyway, it appears that SQL*Plus connections generate this same statement.
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:15628139
56388
<http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1562813
956388>
SELECT NULL FROM DUAL FOR UPDATE NOWAIT; December 27, 2005
David
-----Original Message-----
From: Taft, David
Sent: Thursday, April 12, 2007 3:30 PM
To: 'darrah.john_at_gmail.com'; Dave.Herring_at_acxiom.com
Cc: oracle-l_at_freelists.org
Subject: RE: DML on dual?
John,
Hmmm, my memory may not be serving me too well here, but this reminds me of something I read in Tom Kyte's newest book. I don't have the book with me, so I can't look it up, but I think he had an example of some sort of home-grown concurrency control mechanism. Probably an example of how not to code. Anyway, I believe the example was such that a session had to hold this lock for the code to proceed. Darn, the one day I don't have that book on hand.
Cheers,
David Taft
From: John Darrah [mailto:darrah.john_at_gmail.com]
I've seen several oracle trace files that have the statement "SELECT 1 FROM DUAL FOR UPDATE NOWAIT" I have no idea what the purpose of that statement is but it probably explains what you are seeing.
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Apr 12 2007 - 14:48:08 CDT