Queries

Queries allows running of SQL statements.

Green SQL terminal

Press "SQL Terminal" button (Toolbar, Query tab) or press Ctrl-T to open green SQL terminal. This SQL terminal designed in style of 1980's text terminals.

Besides just design solution, SQL terminal can be useful if you need get results in through-out text format.

Write SQL statement, or paste SQL statement, or use previous statement; select it by mouse or Shift + navigation buttons (left, right, up, down, page up, page down, home, end and so on), and press F5. Selected statement will be ran. Result(s) will be inserted immediately after query in pseudographic table view.

Header of table is two lines: the first line shows name of field, the second line shows type of field.

Specially to clearly know values, two special symbols are used:

o - means Null value

# - means no symbol. This symbol is important for text fields, in case if value terminates with spaces.

Width of fields in the table is automatically calculated.

In case if a field has significant number of lines, and value has significant number of chars, complete string (field value) is inserted into the table, and table continues from the next line. The beginning of the line is marked by ^ symbol, to comply table structure.

When you write SQL statements, you can press F4 to show all available tables in current database. Also you can press F5 to change current database: list of available databases will be showed.

Press Alt-F4 to close terminal window.

Queries

Open new SQL query window: press New query button (Toolbar, Query tab). After that new window will be opened.

Write SQL statement. Press F5 to execute selected query in current query window.

If the query does not return table data, text result will be added to Result page of current query window.

if the query return one or more tables as a result, one or more pages will be added, every added window will show the result. Text results will be added to Result page of current query window.

You can save queries to text file, or load queries from text file - use "Load Query from file" and "Save to Text file" buttons (Toolbar, Query edit tab).