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.CREATE VIEW skeleton).Each row shows the view icon, the name, and a VIEW badge. Rows expose actions on hover:
| Action | Effect |
|---|---|
| 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 lazily loads the definition and renders it in a monospace block:
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 button opens an editor tab with a starter template. Fill in the name and query, then execute:
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 databases with ease.
Download Free Trial