Return fixed date from sysdate in Oracle

Get constant date from sysdate in Oracle

Fixed date parameter is used to fetch the fixed data for sysdate instead of current date. You can fix the value of sysDate with this parameter.

Fixed the value of Sysdate function in Oracle:

-- get Current date 
SQL> select sysdate from dual; 
SYSDATE
---------
02-FEB-23

SQL> alter system set fixed_date='2020-01-01 01:00:00';
System altered.

SQL> select sysdate from dual;
SYSDATE
---------
01-JAN-20

Default value FIXED_DATE function is none. you can undo setting as:



SQL> alter system set fixed_date=none;



System altered.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.