Category: SQL Tips

Oracle comparing dates : dates, oracle, date comparison in oracle pl/sql

How to compare dates in oracle?There are a number of ways you can compare two dates in oracle to check which is greater or which is small.This is particularly useful when we do operations based on certain date conditions.This is used along with to_date and other date functions.


ORA-01882: TIMEZONE REGION NOT FOUND. This error occurs when timezone region string not found.The specified region name was not found.There are a number of time zone constants defined in oracle to use.See the last part of this post to know hoe to get the defined time zone constants in your oracle database.


The DATE type is stored in a special internal format that includes not just the month, day, and year, but also the hour, minute, and second.There are a number of key words and functions provided by oracle to use the date and timestamp data types in much flexible ways.

DATE Data type in Oracle|Oracle Dates and Times|Dates in OracleDATE Data type in Oracle|Oracle Dates and Times|Dates in Oracle

In Oracle Date data is stored in fixed-length fields of seven bytes each, corresponding to century, year, month, day, hour, minute, and second. (Also Read Formatting date in SQL (Oracle) -Simple date forma…) .

Autonomous Transactions in PL/SQL -Autonomous Transactions

Before going through this article it will be helpful to read SQL – Transaction Statements -Transaction Management… and Savepoints In SQL Transactions. – SAVEPOINT to know more about SQL transactions.
Autonomous transactions are independent transactions that can be called from within another transaction.