Sorry Mohammed, but this approach is wrong in several ways and not correct in any way.
To summarise again:
- relations don't have a default order
- with possible parallel sessions you need locking to force data change operations into a specific order
- when the last inserted record is relevant to your application a separate column needs to be maintained
- Lars