You can save SQL documents as text files to reuse or rerun. The default file
extension is .sql.
To save an SQL document
If you do not specify a directory path and you are attempting to save a new
SQL document, the statements are saved in the current directory.
Warning
After you have saved an SQL document, the SQL Editor window remains open. If
you enter a new query and want to save it to a file, choose File->Save
As. This ensures your previously saved file is not overwritten.