tencent cloud

All product documents
Data Lake Compute
CREATE VIEW AS
Last updated: 2024-08-07 17:22:11
CREATE VIEW AS
Last updated: 2024-08-07 17:22:11

Description

Supported engines: Presto and SparkSQL
Purpose: Create view.

Standard Statement

CREATE [ OR REPLACE ] VIEW [IF NOT EXISTS] view_name
[(column_name [COMMENT 'column_comment'][, ...])]
[COMMENT 'view_comment']
AS select_statement

Parameter

[IF NOT EXISTS]: Create a view if no such view exists.
view_name: View name
[(column_name [COMMENT 'column_comment'][, ...])]: Column name, which can be followed by a column comment.
[COMMENT 'view_comment']: View comment
select_statement: Query statement.

Example

create or replace view db1.v1 as select x,y from tbl;

create view test_view (id comment 'test c1', name_length comment 'test name c2') as select id, length(name) from test;



Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon