You can create SQL and XQuery templates to use when you
type SQL and XQuery statements in the SQL and XQuery editor.
The template pattern can contain any valid SQL or XQuery
clause or expression and can include variables. The variables from
which you can choose are specific to the context of the pattern.
To
create an SQL or XQuery template:
- Select .
- In the Preferences window, select .
- On the Templates page, click New.
- In the New Template window, specify the name of the template
and select whether you want an SQL or an XQuery template.
- If you want the template to be inserted automatically after
you type its name in the SQL and XQuery editor and press Ctrl + Space, select
the Automatically insert check box. The
template name must be unique to automatically insert the template.
- Type a short description of the template.
- Type the template pattern. To add a variable at the insertion
point, click Insert Variable, and then select
the variable that you want in the pop-up window.
- Click OK. Your template
is added to the list on the Templates page in the Preferences window.
- Click OK in the Preferences window.
The new template is now available for you to use in the SQL and
XQuery editor.