Thanks both of you,
I ran EXPLAIN command on above suggested query and got following result:
"Aggregate (cost=2.77..2.79 rows=1 width=10)"
" -> Seq Scan on studentfeespayment (cost=0.00..2.77 rows=1 width=10)"
" Filter: (date_part('month'::text, (recieptmonthyear)::timestamp
without time zone) = 4::double precision)"
What does this mean? Can I optimize it better?
--
View this message in context: http://www.nabble.com/Retrieve-month-from-date-tf3617513.html#a10105471
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.