save my last run SQL command
i have a requirement where i want to save or spool my last run SQl command in a txt file .
i run first command : INSERT INTO ABC VALUES ('A');
now when i run second command : UPDATE ABC SET TYPE='B';
i want to save/spool my last SQl command (insert statement)
in a txt file or anywhere else.
so is there any SQL script for that.
pls help me out
implicit or autospool of last run SQL command
that i know. but i am looking for auto spool of my sql command.
i have not to save any specific or single command explicitly.
my requirement is that whenever i run a SQL command at sql prompt
my last SQL command or ,alternatively, the current command should get spooled implicitly or automatically to a txt file.
i dont want to spool manually by writting spool command after each of my SQL command.
is there any script for that.
looking for help.