musicking123
musicking123

Reputation: 3445

Where are these functions are stored in Oracle database?

Where is the function sysdate stored, and in what package, e.g:

select sysdate from dual;
select systimestamp from dual;

Also, take this query:

select sys.login_user,sys.database_name ,sys.sysevent from dual;

Upvotes: 0

Views: 2329

Answers (2)

Tony Andrews
Tony Andrews

Reputation: 132580

SYSDATE and SYSTIMESTAMP are functions in the STANDARD package owned by SYS. However, this is a special package and so you don't need to specify standard.sysdate (in fact, you can't!)

You can view this package like this:

select text
from   all_source
where owner='SYS'
and name='STANDARD'
and type = 'PACKAGE BODY'
order by line;

Upvotes: 3

pauljwilliams
pauljwilliams

Reputation: 19225

sys is a schema. sysdate is a glovbally available variable containing the current date/time.

Upvotes: 0

Related Questions