Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Oracle PL/SQL: Date Functions: GREATEST Jump to:  
Category: >> Oracle PL/SQL >> Date Functions: GREATEST Bookmark and Share

<< lastnext >>

Snippet Name: Date Functions: GREATEST

Description: Returns the latest date value.

Also see:
» FUNCTIONS: date/time
» UPDATE: Update a partitioned table
» UPDATE: Update based on a record
» UPDATE: Update Object Table
» UPDATE: with RETURNING clause
» UPDATE: Nested Table Update example
» UPDATE: Correlated Update
» UPDATE: Update from a SELECT statement
» UPDATE: based on multiple returned val...
» UPDATE: Update based on a query
» UPDATE: Update multiple rows
» UPDATE: update a specific record
» UPDATE: Single row
» Date Functions: EXTRACT
» Date Functions: TO_DSINTERVAL
» Date Functions: TO_NCHAR
» Date Functions: TO_YMINTERVAL
» Date Functions: Calculate elapsed time...
» Date/Time Calculations: Get seconds be...
» Date: Find first day of the month
» Date Calculations
» Date Functions: WHERE Clause Joins
» Date Functions: TRUNC
» Date Functions: SYSDATE
» Date Functions: TO_CHAR
» Date Functions: ROUND
» Date Functions: NEXT_DAY
» Date Functions: NEW_TIME
» Date Functions: MONTHS_BETWEEN
» Date Functions: MIN

Comment: (none)

Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: March 03rd, 2009

LEAST(<date>, <date>, <date>, ...)
 
CREATE TABLE t (
datecol1 DATE,
datecol2 DATE,
datecol3 DATE)
PCTFREE 0
TABLESPACE data_sml;
 
INSERT INTO t VALUES (SYSDATE+23, SYSDATE-10, SYSDATE-24);
INSERT INTO t VALUES (SYSDATE-15, SYSDATE, SYSDATE+15);
INSERT INTO t VALUES (SYSDATE-7, SYSDATE-18, SYSDATE-9);
COMMIT;
 
SELECT * FROM t;
 
SELECT GREATEST(datecol1, datecol2, datecol3)
FROM t;
 
LAST_DAY
Returns The LAST DATE OF A MONTH     LAST_DAY(<date>)
SELECT * FROM t;
 
SELECT LAST_DAY(datecol1) FROM t;


Free
Oracle Magazine
Subscriptions
and Oracle White Papers


SQL University.net courses meet the most demanding needs of the business world for advanced education in a cost-effective manner. SQL University.net courses are available immediately for IT professionals and can be taken without disruption of your workplace schedule or processes.

Compared to traditional travel-based training, SQL University.net saves time and valuable corporate resources, allowing companies to do more with less. That's our mission, and that's what we deliver.

Click here to find out more
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 88 users online    © 2009 psoug.org

PSOUG LOGIN
Username: 
Password: 
Forgot your password?