Or you can use a tool like Oracle SQL*Worksheet, Oracle SQL Developer, TOAD, etc... which automatically keep SQL statement history.