SQL Query History is designed to simplify the recurring execution of the statements you executed previously.
To open Execution History, go to the View menu > Other Windows > Execution History.
To quickly find the required query, you can:
To edit and/or reuse an executed query, right-click it on the list and select either To Clipboard or To New SQL Window.
1. On the Tools menu, click Options. The Options dialog opens.
2. Go to Environment > Documents > Execution History.
3. To enable the storage of SQL Query History, select the checkbox next to the Store executed queries within option, and set the number of days to store executed queries.
4. Optional: Modify the path to store the SQL Query History, the maximum script size to store, and the timeframe for the default output of SQL Query History.