Section: Views, Functions, Triggers, and Extensions

Create view

sql
sql
CREATE VIEW active_users AS
SELECT user_id, email
FROM public.users
WHERE deleted_at IS NULL;
Explanation

See summary for usage details.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Views, Functions, Triggers, and Extensions
Create database
Create a new database in the cluster.
OpenIn sheetsql1 tag match
Create schema
Create a namespace for objects.
OpenIn sheetsql1 tag match
Create database with owner
Create a database with explicit owner and template.
OpenIn sheetsql1 tag match
Create table
Create a basic table with primary key and defaults.
OpenIn sheetsql1 tag match
Create identity column
Use a SQL-standard identity column instead of serial.
OpenIn sheetsql1 tag match
Create login role
Create a role that can log in.
OpenIn sheetsql1 tag match