Friday, July 4, 2008

First day of the month oracle SQL Query

pretty much simple way get the First day of any month using SQL Query is

select trunc(sysdate,'MONTH') from dual

Trunc Function of PL/SQL when passed with a 'Month' parameter will return the first date of a month.

instead of sysdate use the date value you want

sysdate trunc(my_birth_day,'MONTH') from My_Details

No comments: