Friday, September 12, 2008

PL/SQL Datatype PART 3

DATE
You use the DATE datatype to store fixed-length datetimes, which include the time of day in seconds since midnight. Valid dates range from January 1, 4712 BC to December 31, 9999 AD. PL/SQL automatically converts character values in the default date format to DATE values. The default date format is set by the Oracle initialization parameter NLS_DATE_FORMAT.

TIMESTAMP
The datatype TIMESTAMP, which extends the datatype DATE, stores the year, month, day, hour, minute, and second. Precision specifies the number of digits in the fractional part of the seconds field. (While decalring TIMESTAMP type variable we can pass optional parameter Precision whose range between 0 to 9 and has default value as 6.)

No comments: