Intellisense is a feature of the Text Editor component which, as you type a query, will show a dropdown list of keywords, table names, column names or column functions. This is a great time saver when building a query.
This feature is context sensitive. AQT will parse your SQL and show you the dropdown list appropriate to your position in the query; for instance if you are in the column-list, AQT will show you the column-list dropdown, if you are in the table-list, AQT will show you table-list dropdown.
You have the choice of having the dropdown lists show automatically, or open when you hit a hot key. The hot keys are as follows:
Dropdown |
Hotkey |
keywords |
Tab |
keyword completion |
Alt+K or Ctrl+Space |
table name |
Alt+T |
column names |
Alt+C |
column functions |
|
column values |
Alt+V |
AQT will show a dropdown list of the schemas in your database. If your database is one that does not have schemas, you will be shown a list of tables.
Once you have selected a schema, AQT will show you a list of tables in that schema
Some notes:
Important - before AQT can give you a drop-down of column names, you must hit F2.
When F2 is hit, AQT will parse your SQL to determine the tables in your query, and will fetch the column names for your tables. This must be done before AQT is able to show you a drop-down list of your columns. You should also hit F2 if you change the tables in your query, or change the correlation names (table-ids) of the tables.
The column-list drop-down is shown after a blank or comma is hit and you in a column-list or where-clause part of the SQL. Alternatively, you can activate the column-list drop-down with Alt+C.
AQT also has the ability to show a dropdown list of column functions. You do this by typing a fullstop after the name of a column - once you have selected the column, it will be applied to the column names using the normal function syntax.
Intellisense can be used when your query contains multiple tables. AQT understands the syntax for a multiple-table query; when you need to refer to a column-name, AQT will give you a dropdown of the table-ids. This is shown in the following example. When you select a table-id, you will be given a dropdown of the columns within that table.
Note that for multi-table queries, it is strongly recommended that you use table-ids with your tables (these are emp and empinfo in this example). If these are not given, column names can be ambiguous (eg. AQT may not know which table a column is in), which can cause problems with the way this component works.
A dropdown list of keywords does not happen automatically, but only when you hit Alt+K or Ctrl+Space
By default, Intellisense is active. You can switch off by clicking on the Intellisense button in the Edit Toolbar. This can be useful if you are typing a lot of text into your SQL.
Options governing the use of Intellisense are in Options > Run SQL > Intellisense.