SQL Manage Views
The Views activity lists every view in the current database and lets you preview definitions, edit them in the SQL Editor, or drop them — all without leaving the workspace. A search box filters the list live, and an inline DDL preview means you can audit view bodies without opening a separate dialog.
CREATE VIEW definition.The header shows the database type and the connection, database, and schema the list belongs to.
Each row shows the view icon, the name, a VIEW badge, and a set of actions at the end:
| Action | Effect |
|---|---|
| Open rows | Opens the view as a browsable dataset in the SQL Table activity. |
| Edit | Loads the view's definition into the SQL Editor as an ALTER VIEW / CREATE OR REPLACE VIEW template. |
| Show DDL | Opens the DDL viewer with the full CREATE VIEW statement. |
| Drop | Confirms, then issues DROP VIEW. |
Additional interactions:
Expanding a row loads the definition and renders it in a monospace Definition block, with Open rows, Edit, and Open DDL shortcuts above it:
Another example of what a definition looks like:
CREATE OR REPLACE VIEW active_users AS
SELECT u.id, u.email, u.created_at
FROM users u
WHERE u.deleted_at IS NULL
AND u.tenant_id = current_setting('app.tenant_id')::int;
If the driver cannot return the source (for example, encrypted views on SQL Server), the preview displays No definition available.
The New View button opens a New View tab. Type the name into the CREATE OR REPLACE VIEW … AS line at the top, pick the schema in the toolbar, write the query in the editor below, and click Save. Reload discards unsaved edits, Drop removes an existing view, and the Messages and History tabs underneath report what ran.
For example, a finished view might look like:
CREATE VIEW monthly_revenue AS
SELECT date_trunc('month', paid_at) AS month,
SUM(amount) AS revenue
FROM payments
WHERE status = 'paid'
GROUP BY 1
ORDER BY 1;
CREATE OR REPLACE VIEW and materialized views (REFRESH MATERIALIZED VIEW).ALGORITHM and SQL SECURITY clauses.ALTER VIEW for updates and does not allow ORDER BY without TOP.DROP VIEW + CREATE VIEW to modify.CREATE VIEW.Download and start managing your MongoDB and SQL databases with ease.
Download Free Trial