Author Archives: SandeepSingh DBA

About SandeepSingh DBA

Hi, I am working in IT industry with having more than 10 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

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.