Change to
Select ddate from ( select ddate from transactions where code='KSH' order by ddate desc) where rownum=1;
**** If that code is not exist in table then first query takes very much time but second one comes faster.
Also can change into subquery
No comments:
Post a Comment