Views
Views appear in the sidebar under Views, next to Tables, for every database.
Creating a view
Right-click the database — or the Views group — and choose New view. NabuSQL asks for a name and opens the view editor, where you write the SELECT the view is built from.
Opening a view
Right-click a view for two options:
- Open View — runs it and shows the rows in a data grid, like a table.
- Open Design — opens the definition for editing.
Reading a view is identical to reading a table: filter, sort, page and export all work the same way.
Editing and dropping
Save from the design editor to replace the definition. Drop view removes it, after a confirmation naming the view.
Dropping a view never touches the underlying tables — the definition is all there is.
Views and writes
Whether a view accepts INSERT, UPDATE or DELETE is decided by your database server, not by NabuSQL. Simple single-table views usually do; anything with a join, aggregate or DISTINCT usually does not. If the grid rejects an edit on a view, that rejection came from the server.
Building the SELECT visually
If the query behind the view involves several joined tables, draft it in the visual query builder first, then paste the generated SQL into the view definition.
