Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/src/main/sphinx/sql/create-view.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Synopsis
.. code-block:: text

CREATE [ OR REPLACE ] VIEW view_name
[ COMMENT view_comment ]
Comment thread
raunaqmorarka marked this conversation as resolved.
Outdated
[ SECURITY { DEFINER | INVOKER } ]
AS query

Expand Down Expand Up @@ -48,6 +49,14 @@ Create a simple view ``test`` over the ``orders`` table::
SELECT orderkey, orderstatus, totalprice / 2 AS half
FROM orders

Create a view ``test_with_comment`` with a view comment::

CREATE VIEW test_with_comment
COMMENT 'A view to keep track of orders.'
AS
SELECT orderkey, orderstatus, totalprice
FROM orders

Create a view ``orders_by_date`` that summarizes ``orders``::

CREATE VIEW orders_by_date AS
Expand Down