User Guide > Views and Table Resources > Ad Hoc SQL and the SQL Scratchpad Editor > The SQL Scratchpad History Pane
 
The SQL Scratchpad History Pane
If you click the Show History View button, a History pane appears on the right edge of the SQL Scratchpad editor, listing the SQL queries that you have created or changed in this window.
The History pane lets you:
See the distinct queries you have executed. The history list retains the number of queries you specify in the Studio Options window, with the most recently used query at the top.
Instantly display a previous query in the work area.
Save all distinct queries automatically.
Lock a query so it cannot be deleted.
You can Alt-click an unlocked query in the history list to lock it. You can lock as many queries as you want.
When a query is locked, a lock icon appears next to it. Locked queries do not count toward the Maximum History Size set in the Studio Options window.
Unlock a query so it can be deleted. Alt-click a locked query in the history list to unlock it.
Delete a selected query from the history list (after unlocking it, if necessary).
Change the maximum number of queries to save in the history list. Click Maximum History Size in the Studio Options window and choose a number from the drop-down list.
Changes to maximum history size do not take effect until you restart Studio.