Home » SQL & PL/SQL » SQL & PL/SQL » add_months
add_months [message #36538] Mon, 03 December 2001 16:55 Go to next message
cher
Messages: 1
Registered: December 2001
Junior Member
Is there an opposite to add_months? I want to select data for the last rolling 12 months. Thanks

----------------------------------------------------------------------
Re: add_months [message #36539 is a reply to message #36538] Tue, 04 December 2001 00:46 Go to previous message
Pratibha
Messages: 29
Registered: November 2001
Junior Member
Hi,

U can use add_months only like this

select add_months(sysdate,-12) from dual;

where -12 is the no. of months.
this will substract -12 months from system date.

Bye

----------------------------------------------------------------------
Previous Topic: procedure
Next Topic: help for retrieve the columns name from a table
Goto Forum:
  


Current Time: Tue Mar 31 06:06:53 CDT 2020