RE: DML on dual?
- From: "Taft, David" <TaftD@xxxxxxxxxxx>
- To: "'darrah.john@xxxxxxxxx'" <darrah.john@xxxxxxxxx>, "'Dave.Herring@xxxxxxxxxx'" <Dave.Herring@xxxxxxxxxx>
- Date: Thu, 12 Apr 2007 15:48:08 -0400
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@xxxxxxxxx'; Dave.Herring@xxxxxxxxxx Cc: oracle-l@xxxxxxxxxxxxx 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@xxxxxxxxx] 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.