Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> SYSDATE

SYSDATE

From: Erik Bowe <ebowe_at_SPSU.edu>
Date: 1997/12/13
Message-ID: <01bd077a$12f51ca0$9af445cf@ebowe>#1/1

Got a quick question on SYSDATE...

I'm currently working on project where we are migrating some Pro*C, UNIX processes to make them fully Oracle 7 compliant by removing "workarounds" that were necessary in Oracle 6. One of the major changes is converting a number of UPDATE statements that read as follows:

	UPDATE <tablename>
	   SET <date field 1> = (SELECT SYSDATE FROM DUAL),
                      <date field 2> = (SELECT SYSDATE FROM DUAL),
  	          ....

            WHERE <some condition>

...to just using SYSDATE without the SELECT.

Unfortunately, I'm being told by a DBA that by just putting SYSDATE, I won't gain anything but readability in the code and that internally Oracle 7 is SELECTing SYSDATE from the DUAL table when used in this context. They go on further to say that SYSDATE is actually a pseudo-column.

As I understand it, SYSDATE is a function and not a pseudo-column and by using it WITHOUT the SELECT, it should run a little quicker (unfortunately I haven't had time to test if that's the case).

Can anyone tell me as to what's really going on with SYSDATE within the context of UPDATE??? Is it a function? ...or is it being translated by Oracle behind the scenes to a sub-query within the UPDATE?

Any help would be appreciated!!!

Thanks, Erik
ebowe_at_SPSU.edu Received on Sat Dec 13 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US