Added condition for there is no row available.
Added method for fetching all row.