User Guide > Views and Table Resources > Ad Hoc SQL and the SQL Scratchpad Editor > Composing and Executing an Ad Hoc SQL Query
 
Composing and Executing an Ad Hoc SQL Query
This section describes how to create a new ad hoc SQL query in the SQL Scratchpad editor.
To create and execute an ad hoc SQL query
1. Open the SQL Scratchpad editor.
See Opening the SQL Scratchpad Editor for the three ways you can do this.
2. In the main scratchpad area, type your query.
3. Click the Execute button.
After you click the Execute button, a Result panel (see The SQL Scratchpad Result Panel) appears and shows query execution in progress and the results returned. You can dismiss the Results panel by clicking the Delete button on the right side of its tab.
Note: If you precede the SQL query with the keyword EXPLAIN, the Result panel displays the query execution plan. In this case, the query is not executed; rather, the plan is formulated and displayed for the user to examine. This plan text is also available to JDBC and ODBC clients.